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

# Sso Callback

> Handle the SSO callback after the IdP redirects back.

In production: validates SAML response / OIDC code, resolves or
JIT-provisions the user, issues a CL-AT + CL-RT.  Here we stub this:
any non-error callback is resolved to the first seeded user of the workspace.



## OpenAPI

````yaml /openapi.json get /v1/auth/sso/callback
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/auth/sso/callback:
    get:
      tags:
        - auth
      summary: Sso Callback
      description: >-
        Handle the SSO callback after the IdP redirects back.


        In production: validates SAML response / OIDC code, resolves or

        JIT-provisions the user, issues a CL-AT + CL-RT.  Here we stub this:

        any non-error callback is resolved to the first seeded user of the
        workspace.
      operationId: sso_callback_v1_auth_sso_callback_get
      parameters:
        - in: query
          name: state
          required: true
          schema:
            title: State
            type: string
        - in: query
          name: code
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Code
        - in: query
          name: error
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Error
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SsoCallbackResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    SsoCallbackResponse:
      properties:
        access_token:
          title: Access Token
          type: string
        refresh_token:
          title: Refresh Token
          type: string
        token_type:
          default: bearer
          title: Token Type
          type: string
        user:
          additionalProperties: true
          title: User
          type: object
        workspace:
          additionalProperties: true
          title: Workspace
          type: object
      required:
        - access_token
        - refresh_token
        - user
        - workspace
      title: SsoCallbackResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````