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

# Set up the authenticator after SSO

> When the tenant asks for the Niadra second factor on top of the provider.



## OpenAPI

````yaml openapi/en/control.json POST /v1/auth/sso/second-factor
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/auth/sso/second-factor:
    post:
      summary: Set up the authenticator after SSO
      description: >-
        The authenticator enrollment of a person who signed in through SSO, when
        the tenant asks for the Niadra

        second factor: the sign-in code and the kept value stand in for the
        password.


        **Authentication.** No authentication.
      operationId: sso_second_factor_v1_auth_sso_second_factor_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SsoCodeRequest'
            example:
              code: bXktb25lLXRpbWUtc2lnbi1pbi1jb2Rl
              verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecondFactorOut'
              example:
                secret: JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP
                totp_uri: >-
                  otpauth://totp/Niadra:nina@acme.example?secret=JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP&issuer=Niadra&algorithm=SHA1&digits=6&period=30
          description: The secret to set up the authenticator app.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security: []
components:
  schemas:
    SsoCodeRequest:
      additionalProperties: false
      properties:
        code:
          maxLength: 128
          minLength: 20
          title: Code
          type: string
        verifier:
          maxLength: 128
          minLength: 20
          title: Verifier
          type: string
      required:
        - code
        - verifier
      title: SsoCodeRequest
      type: object
    SecondFactorOut:
      additionalProperties: false
      properties:
        secret:
          description: Base32 TOTP secret, for typing into an authenticator app.
          title: Secret
          type: string
        totp_uri:
          description: otpauth:// address of the same secret, for a QR code.
          title: Totp Uri
          type: string
      required:
        - secret
        - totp_uri
      title: SecondFactorOut
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object

````