> ## Documentation Index
> Fetch the complete documentation index at: https://docs.insforge.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin login

> Authenticates admin user for dashboard access



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/auth.yaml post /api/auth/admin/sessions
openapi: 3.0.3
info:
  title: Insforge Authentication API
  version: 2.0.0
  description: Authentication endpoints with separated auth and profile tables
servers: []
security: []
paths:
  /api/auth/admin/sessions:
    post:
      tags:
        - Admin
      summary: Admin login
      description: Authenticates admin user for dashboard access
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - password
              properties:
                username:
                  type: string
                  example: admin
                password:
                  type: string
      responses:
        '200':
          description: Admin login successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  projectAdmin:
                    $ref: '#/components/schemas/ProjectAdminResponse'
                  accessToken:
                    type: string
                  csrfToken:
                    type: string
                    description: CSRF token for `/api/auth/admin/refresh`
        '401':
          description: Invalid credentials
        '403':
          description: User is not an admin
components:
  schemas:
    ProjectAdminResponse:
      type: object
      required:
        - subject
        - username
      properties:
        subject:
          type: string
          example: local:admin
        username:
          type: string
          example: admin

````