> ## Documentation Index
> Fetch the complete documentation index at: https://task-social.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Log in

> Verifies the user's credentials and sets a JWT in the HttpOnly `tokenName` cookie. The returned cookie is used automatically for authenticated requests.




## OpenAPI

````yaml /openapi-bundled.yaml post /api/v1/auth/login
openapi: 3.1.0
info:
  title: TaskSocial API
  version: 1.0.0
  description: REST API for TaskSocial, a social accountability application.
servers:
  - url: https://tasksocial-production.up.railway.app
    description: TaskSocial production API
security: []
tags:
  - name: Authentication
    description: User registration and authentication
  - name: Tasks
    description: Task creation and management
paths:
  /api/v1/auth/login:
    post:
      tags:
        - Authentication
      summary: Log in
      description: >
        Verifies the user's credentials and sets a JWT in the HttpOnly
        `tokenName` cookie. The returned cookie is used automatically for
        authenticated requests.
      operationId: loginUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
            example:
              email: shahzeb@example.com
              password: password123
      responses:
        '200':
          description: >
            Login successful. The server sets the `tokenName` HttpOnly cookie
            containing the JWT used to authenticate protected endpoints.
          headers:
            Set-Cookie:
              description: >
                Authentication cookie containing the JWT. This cookie is created
                by the server; clients do not need to generate an API key.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  user:
                    $ref: '#/components/schemas/User'
        '400':
          description: Missing credentials or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LoginRequest:
      type: object
      required:
        - email
        - password
      properties:
        email:
          type: string
          format: email
        password:
          type: string
          format: password
    User:
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        email:
          type: string
          format: email
    Error:
      type: object
      properties:
        message:
          type: string

````