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

# Complete SSO Login

> Completes the SSO login process by exchanging the authorization code obtained from the identity provider for the user's authentication token.

#### Authentication

No authentication required.

#### Required Permissions

No authentication required.


## OpenAPI

````yaml /openapi.yaml post /auth/login/sso
openapi: 3.1.0
info:
  version: 2.0.449
  title: Dfns
servers:
  - url: https://api.dfns.io
    description: Default - Europe
  - url: https://api.uae.dfns.io
    description: UAE
  - url: https://api.dfns.ninja
    description: <Deprecated> Staging
security: []
paths:
  /auth/login/sso:
    post:
      tags:
        - Auth
      summary: Complete SSO Login
      description: >-
        Completes the SSO login process by exchanging the authorization code
        obtained from the identity provider for the user's authentication token.
      operationId: ssoLogin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: Authorization code obtained from the IdP
                state:
                  type: string
                  description: State forwarded by the IdP
              required:
                - code
                - state
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: Authentication token issued to the user.
                  expiry:
                    type: number
                    description: Token expiration time in epoch milliseconds.
                  identity:
                    type: object
                    properties:
                      orgId:
                        type: string
                      tenantId:
                        type: string
                      userId:
                        type: string
                      username:
                        type: string
                    required:
                      - userId
                      - username
                    description: >-
                      Decoded identity for the issued token. Populated for flows
                      whose token is not a Dfns-minted JWT (e.g. OIDC
                      passthrough) so clients can skip JWT decoding; absent on
                      flows where the token's claims carry the same fields.
                required:
                  - token
      security:
        - {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.