components:
  examples:
    AuthenticatedByCode:
      summary: 'Authenticated by code.

        '
      value:
        data:
          methods:
          - at: 1711555057.065702
            email: email@domain.org
            method: code
          user: &id001
            display: Magic Wizard
            email: email@domain.org
            has_usable_password: true
            id: 123
            username: wizard
        meta:
          access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW
          is_authenticated: true
          session_token: ufwcig0zen9skyd545jc0fkq813ghar2
        status: 200
    AuthenticatedByPassword:
      summary: 'Authenticated by password.

        '
      value:
        data:
          methods:
          - at: 1711555057.065702
            email: email@domain.org
            method: password
          user: *id001
        meta:
          access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW
          is_authenticated: true
          session_token: ufwcig0zen9skyd545jc0fkq813ghar2
        status: 200
    AuthenticatedByPasswordAnd2FA:
      summary: 'Fully authenticated using by password and 2FA.

        '
      value:
        data:
          methods:
          - at: 1711555057.065702
            email: email@domain.org
            method: password
          - at: 1711555060.9375854
            id: 66
            method: mfa
            type: totp
          user: *id001
        meta:
          access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW
          is_authenticated: true
          session_token: ufwcig0zen9skyd545jc0fkq813ghar2
        status: 200
    CannotGenerateRecoveryCodes:
      summary: 'Unable to generate recovery codes.

        '
      value:
        errors:
        - message: 'You cannot deactivate two-factor authentication.

            code: cannot_generate_recovery_codes

            '
        status: 400
    DisconnectNotAllowedNoPassword:
      summary: Account without a password.
      value:
        errors:
        - code: no_password
          message: Your account has no password set up.
          param: account
        status: 400
    DisconnectNotAllowedNoVerifiedEmail:
      summary: Account without a verified email.
      value:
        errors:
        - code: no_verified_email
          message: Your account has no verified email address.
          param: account
        status: 400
    IncorrectPassword:
      value:
        errors:
        - code: incorrect_password
          message: Incorrect password.
          param: password
        status: 400
    InvalidAuthenticatorCode:
      summary: 'An error response indicating that the provided code is incorrect.

        '
      value:
        errors:
        - code: incorrect_code
          message: Incorrect code.
          param: code
        status: 400
    InvalidEmail:
      value:
        errors:
        - code: invalid
          message: Enter a valid email address.
          param: email
        status: 400
    InvalidEmailVerificationKey:
      summary: 'Email verification key invalid.

        '
      value:
        errors:
        - code: invalid
          message: Invalid or expired key.
          param: key
        status: 400
    InvalidPasswordResetKey:
      summary: 'Password reset key invalid.

        '
      value:
        errors:
        - code: token_invalid
          message: The password reset token was invalid.
          param: key
        status: 400
    InvalidProviderToken:
      summary: 'Provider token invalid.

        '
      value:
        errors:
        - code: invalid
          message: The token was invalid.
          param: token
        status: 400
    PasswordMismatch:
      value:
        errors:
        - code: email_password_mismatch
          message: The email address and/or password you specified are not correct.
          param: password
        status: 400
    ReauthenticationRequired:
      summary: 'Reauthentication required

        '
      value:
        data:
          flows:
          - id: reauthenticate
          - id: mfa_reauthenticate
          methods:
          - at: 1711555057.065702
            email: email@domain.org
            method: password
          - at: 1711555060.9375854
            id: 66
            method: mfa
            type: totp
          user: *id001
        meta:
          is_authenticated: true
        status: 401
    UnauthenticatedInitial:
      summary: 'Unauthenticated: Initial

        '
      value:
        data:
          flows:
          - id: login
          - id: signup
          - id: provider_redirect
            providers:
            - facebook
            - google
            - telegram
          - id: provider_token
            providers:
            - google
        meta:
          is_authenticated: false
        status: 401
    UnauthenticatedPending2FA:
      summary: 'Unauthenticated: pending 2FA

        '
      value:
        data:
          flows:
          - id: login
          - id: signup
          - id: provider_redirect
            providers:
            - facebook
            - google
            - telegram
          - id: provider_token
            providers:
            - google
          - id: mfa_authenticate
            is_pending: true
        meta:
          is_authenticated: false
        status: 401
    UnauthenticatedPendingEmailVerification:
      summary: 'Unauthenticated: pending email verification

        '
      value:
        data:
          flows:
          - id: login
          - id: signup
          - id: provider_redirect
            providers:
            - facebook
            - google
            - telegram
          - id: provider_token
            providers:
            - google
          - id: verify_email
            is_pending: true
        meta:
          is_authenticated: false
        status: 401
    UnauthenticatedPendingLoginByCode:
      summary: 'Unauthenticated: pending login by code

        '
      value:
        data:
          flows:
          - id: login
          - id: signup
          - id: provider_redirect
            providers:
            - facebook
            - google
            - telegram
          - id: provider_token
            providers:
            - google
          - id: mfa_authenticate
          - id: login_by_code
            is_pending: true
        meta:
          is_authenticated: false
        status: 401
    UnauthenticatedPendingProviderSignup:
      summary: 'Unauthenticated: pending provider signup

        '
      value:
        data:
          flows:
          - id: login
          - id: signup
          - id: provider_redirect
            providers:
            - facebook
            - google
            - telegram
          - id: provider_token
            providers:
            - google
          - id: provider_signup
            is_pending: true
            provider:
              client_id: 123.apps.googleusercontent.com
              flows:
              - provider_redirect
              - provider_token
              id: google
              name: Google
        meta:
          is_authenticated: false
        status: 401
    User:
      value: *id001
  parameters:
    Client:
      description: The type of client accessing the API.
      in: path
      name: client
      required: true
      schema:
        enum:
        - app
        - browser
        type: string
    EmailVerificationKey:
      description: The email verification key
      in: header
      name: X-Email-Verification-Key
      required: true
      schema:
        type: string
    PasswordLess:
      allowEmptyValue: true
      description: 'When present (regardless of its value), enables passwordless sign-in
        via a WebAuthn credential (Passkey),

        but may enforce additional multi-factor authentication (MFA) requirements.
        Omit the parameter to disable.

        '
      in: query
      name: passwordless
      required: false
      schema:
        type: boolean
    PasswordResetKey:
      description: The password reset key
      in: header
      name: X-Password-Reset-Key
      required: true
      schema:
        type: string
    SessionToken:
      description: 'Session token. Only needed when `client` is equal to `app`.

        '
      in: header
      name: X-Session-Token
      required: false
      schema:
        type: string
  requestBodies:
    AddWebAuthnAuthenticator:
      content:
        application/json:
          schema:
            properties:
              credential:
                $ref: '#/components/schemas/WebAuthnCredential'
              name:
                example: Master key
                type: string
            required:
            - credential
            type: object
    AuthenticateWebAuthn:
      content:
        application/json:
          schema:
            properties:
              credential:
                $ref: '#/components/schemas/WebAuthnCredential'
            required:
            - credential
            type: object
      description: Authenticate using WebAuthn.
      required: true
    ChangePassword:
      content:
        application/json:
          schema:
            properties:
              current_password:
                $ref: '#/components/schemas/Password'
              new_password:
                description: 'The current password.

                  '
                example: Aberto!
                type: string
            required:
            - new_password
            type: object
    ConfirmLoginCode:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConfirmLoginCode'
      required: true
    DeleteWebAuthn:
      content:
        application/json:
          schema:
            properties:
              authenticators:
                description: 'The IDs of the authenticator that are to be deleted.

                  '
                items:
                  $ref: '#/components/schemas/AuthenticatorID'
                type: array
            required:
            - authenticators
            type: object
    Email:
      content:
        application/json:
          schema:
            properties:
              email:
                $ref: '#/components/schemas/Email'
            required:
            - email
            type: object
    EndSessions:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EndSessions'
      required: true
    Login:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Login'
      description: Login.
      required: true
    LoginWebAuthn:
      content:
        application/json:
          schema:
            properties:
              credential:
                $ref: '#/components/schemas/WebAuthnCredential'
            required:
            - credential
            type: object
      description: Login using WebAuthn.
      required: true
    MFAAuthenticate:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MFAAuthenticate'
      required: true
    MFATrust:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MFATrust'
      required: true
    MarkPrimaryEmail:
      content:
        application/json:
          schema:
            properties:
              email:
                description: 'An email address.

                  '
                example: email@domain.org
                type: string
              primary:
                description: 'Primary flag.

                  '
                enum:
                - true
                type: boolean
            required:
            - email
            - primary
            type: object
    PasskeySignup:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PasskeySignup'
      description: Signup using a passkey
      required: true
    Phone:
      content:
        application/json:
          schema:
            properties:
              phone:
                example: '+314159265359'
                type: string
            required:
            - phone
            type: object
    ProviderAccount:
      content:
        application/json:
          schema:
            properties:
              account:
                $ref: '#/components/schemas/ProviderAccountID'
              provider:
                $ref: '#/components/schemas/ProviderID'
            required:
            - account
            - provider
            type: object
    ProviderRedirect:
      content:
        application/x-www-form-urlencoded:
          schema:
            $ref: '#/components/schemas/ProviderRedirect'
      description: 'Initiate the provider redirect flow.

        '
      required: true
    ProviderSignup:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProviderSignup'
      description: Provider signup.
      required: true
    ProviderToken:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProviderToken'
      required: true
    Reauthenticate:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Reauthenticate'
      description: Reauthenticate.
      required: true
    ReauthenticateWebAuthn:
      content:
        application/json:
          schema:
            properties:
              credential:
                $ref: '#/components/schemas/WebAuthnCredential'
            required:
            - credential
            type: object
      description: Reauthenticate using WebAuthn.
      required: true
    RefreshToken:
      content:
        application/json:
          schema:
            properties:
              refresh_token:
                $ref: '#/components/schemas/RefreshToken'
            required:
            - refresh_token
            type: object
    RequestLoginCode:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestLoginCode'
      description: Request a login code.
      required: true
    RequestPassword:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestPassword'
      description: Request password.
      required: true
    ResetPassword:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResetPassword'
    SetupTOTP:
      content:
        application/json:
          schema:
            properties:
              code:
                $ref: '#/components/schemas/AuthenticatorCode'
            required:
            - code
            type: object
    Signup:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Signup'
      description: Signup
      required: true
    UpdateWebAuthn:
      content:
        application/json:
          schema:
            properties:
              id:
                $ref: '#/components/schemas/AuthenticatorID'
              name:
                example: Master key
                type: string
            type: object
    VerifyEmail:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VerifyEmail'
    VerifyPhone:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VerifyPhone'
  responses:
    AddAuthenticatorConflict:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConflictResponse'
      description: 'The account prohibits adding an authenticator, e.g. because of
        an unverified email address.

        '
    AddWebAuthnAuthenticator:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/WebAuthnAuthenticator'
              meta:
                properties:
                  recovery_codes_generated:
                    description: 'Whether or not recovery codes where generated automatically.

                      '
                    type: boolean
                type: object
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            - meta
            type: object
      description: A WebAuthn authenticator.
    Authenticated:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthenticatedResponse'
      description: The user is authenticated.
    AuthenticatedByCode:
      content:
        application/json:
          examples:
            authenticated:
              $ref: '#/components/examples/AuthenticatedByCode'
          schema:
            $ref: '#/components/schemas/AuthenticatedResponse'
      description: 'Authenticated by code.

        '
    AuthenticatedByPassword:
      content:
        application/json:
          examples:
            authenticated:
              $ref: '#/components/examples/AuthenticatedByPassword'
          schema:
            $ref: '#/components/schemas/AuthenticatedResponse'
      description: 'Authenticated by password.

        '
    AuthenticatedByPasswordAnd2FA:
      content:
        application/json:
          examples:
            authenticated:
              $ref: '#/components/examples/AuthenticatedByPasswordAnd2FA'
          schema:
            $ref: '#/components/schemas/AuthenticatedResponse'
      description: 'Authenticated by password and 2FA.

        '
    Authentication:
      content:
        application/json:
          examples:
            reauthentication_required:
              $ref: '#/components/examples/ReauthenticationRequired'
            unauthenticated_initial:
              $ref: '#/components/examples/UnauthenticatedInitial'
            unauthenticated_pending_2fa:
              $ref: '#/components/examples/UnauthenticatedPending2FA'
            unauthenticated_pending_email_verification:
              $ref: '#/components/examples/UnauthenticatedPendingEmailVerification'
            unauthenticated_pending_provider_signup:
              $ref: '#/components/examples/UnauthenticatedPendingProviderSignup'
          schema:
            $ref: '#/components/schemas/AuthenticationResponse'
      description: Not authenticated.
    AuthenticationOrReauthentication:
      content:
        application/json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/AuthenticationResponse'
            - $ref: '#/components/schemas/ReauthenticationResponse'
      description: 'The response indicates authentication or re-authentication is
        required.

        '
    Authenticators:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/AuthenticatorList'
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: 'List of authenticators.

        '
    Configuration:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConfigurationResponse'
      description: 'The django-allauth configuration.

        '
    EmailAddresses:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/EmailAddress'
                type: array
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: 'List of email addresses.

        '
    EmailVerificationInfo:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EmailVerificationInfo'
      description: Email verification information.
    Error:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: An input error occurred.
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenResponse'
      description: 'A forbidden response.

        '
    NotFound:
      content:
        application/json:
          schema:
            properties:
              status:
                enum:
                - 404
                type: integer
            required:
            - status
            type: object
      description: 'Not found.

        '
    PasswordResetInfo:
      content:
        application/json:
          schema:
            properties:
              data:
                properties:
                  user:
                    $ref: '#/components/schemas/User'
                type: object
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: Information about the password reset key.
    PhoneNumbers:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PhoneNumbersResponse'
      description: 'List of phone numbers.

        '
    ProviderAccounts:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/ProviderAccount'
                type: array
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: 'List of third-party provider accounts.

        '
    ProviderSignup:
      content:
        application/json:
          schema:
            properties:
              data:
                properties:
                  account:
                    $ref: '#/components/schemas/ProviderAccount'
                  email:
                    items:
                      $ref: '#/components/schemas/EmailAddress'
                    type: array
                  user:
                    $ref: '#/components/schemas/User'
                required:
                - email
                - account
                - user
                type: object
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: 'Information relating to the pending provider signup.

        '
    ReauthenticationRequired:
      content:
        application/json:
          examples:
            reauthentication_required:
              summary: 'Reauthentication required

                '
              value:
                data:
                  flows:
                  - id: reauthenticate
                  - id: mfa_reauthenticate
                  methods:
                  - at: 1711555057.065702
                    email: email@domain.org
                    method: password
                  - at: 1711555060.9375854
                    id: 66
                    method: mfa
                    type: totp
                  user: *id001
                meta:
                  is_authenticated: true
                status: 401
          schema:
            $ref: '#/components/schemas/ReauthenticationResponse'
      description: 'The response indicates reauthentication is required.

        '
    RecoveryCodes:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/SensitiveRecoveryCodesAuthenticator'
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: 'Information on the recovery codes.

        '
    RefreshToken:
      content:
        application/json:
          schema:
            properties:
              data:
                properties:
                  access_token:
                    $ref: '#/components/schemas/AccessToken'
                  refresh_token:
                    $ref: '#/components/schemas/RefreshToken'
                required:
                - access_token
                type: object
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - data
            - status
            type: object
      description: A new access token (and optionally new refresh token).
    SessionGone:
      content:
        application/json:
          examples:
            unauth:
              $ref: '#/components/examples/UnauthenticatedInitial'
          schema:
            $ref: '#/components/schemas/SessionGoneResponse'
      description: 'The response indicates session is invalid or no longer exists.

        '
    Sessions:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/Session'
                type: array
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: 'List of sessions.

        '
    StatusOK:
      content:
        application/json:
          schema:
            properties:
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            type: object
      description: 'A success response.

        '
    TOTPAuthenticator:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/TOTPAuthenticator'
              meta:
                properties:
                  recovery_codes_generated:
                    description: Whether or not recovery codes where generated automatically.
                    type: boolean
                type: object
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: 'Information on the TOTP authenticator.

        '
    TOTPAuthenticatorNotFound:
      content:
        application/json:
          schema:
            properties:
              meta:
                properties:
                  secret:
                    description: 'A TOTP secret that can be used to setup a new authenticator.

                      '
                    example: J4ZKKXTK7NOVU7EPUVY23LCDV4T2QZYM
                    type: string
                  totp_url:
                    description: 'otpauth URI from which a QR code can be generated
                      and scanned by OTP clients.

                      '
                    example: otpauth://totp/Example:alice@fsf.org?secret=JBSWY3DPEHPK3PXP&issuer=Example
                    type: string
                required:
                - secret
                - totp_url
                type: object
              status:
                enum:
                - 404
                type: integer
            required:
            - status
            - meta
            type: object
      description: 'No TOTP authenticator has been set up.

        '
    TooManyRequests:
      content:
        application/json:
          schema:
            properties:
              status:
                enum:
                - 429
                type: integer
            required:
            - status
            type: object
      description: 'Too many requests.

        '
    Unauthenticated:
      content:
        application/json:
          examples:
            unauth:
              $ref: '#/components/examples/UnauthenticatedInitial'
          schema:
            $ref: '#/components/schemas/AuthenticationResponse'
      description: 'There is no authenticated session.

        '
    WebAuthnAuthenticator:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/WebAuthnAuthenticator'
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: A WebAuthn authenticator.
    WebAuthnCreationOptionsResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/WebAuthnCredentialCreationOptions'
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: WebAuthn credential creation options.
    WebAuthnRequestOptionsResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/WebAuthnCredentialRequestOptions'
              status:
                $ref: '#/components/schemas/StatusOK'
            required:
            - status
            - data
            type: object
      description: WebAuthn credential request options.
  schemas:
    AccessToken:
      description: 'The access token.

        '
      example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW
      type: string
    AccountConfiguration:
      description: 'Configuration of the Django `allauth.account` app.

        '
      properties:
        email_verification_by_code_enabled:
          type: boolean
        is_open_for_signup:
          type: boolean
        login_by_code_enabled:
          type: boolean
        login_methods:
          items:
            enum:
            - email
            - username
            type: string
          type: array
        password_reset_by_code_enabled:
          type: boolean
      required:
      - authentication_method
      - email_verification_by_code_enabled
      - is_open_for_signup
      - login_by_code_enabled
      type: object
    Authenticated:
      properties:
        methods:
          description: 'A list of methods used to authenticate.

            '
          items:
            $ref: '#/components/schemas/AuthenticationMethod'
          type: array
        user:
          $ref: '#/components/schemas/User'
      required:
      - user
      - methods
      type: object
    AuthenticatedMeta:
      allOf:
      - $ref: '#/components/schemas/BaseAuthenticationMeta'
      - description: 'Metadata available in an re-authentication related response.

          '
        properties:
          is_authenticated:
            enum:
            - true
            type: boolean
        required:
        - is_authenticated
        type: object
    AuthenticatedResponse:
      properties:
        data:
          $ref: '#/components/schemas/Authenticated'
        meta:
          $ref: '#/components/schemas/AuthenticationMeta'
        status:
          $ref: '#/components/schemas/StatusOK'
      required:
      - status
      - data
      - meta
      type: object
    AuthenticationMeta:
      allOf:
      - $ref: '#/components/schemas/BaseAuthenticationMeta'
      - description: 'Metadata available in an authentication related response.

          '
        properties:
          is_authenticated:
            type: boolean
        required:
        - is_authenticated
        type: object
    AuthenticationMethod:
      oneOf:
      - properties:
          at:
            $ref: '#/components/schemas/Timestamp'
          email:
            $ref: '#/components/schemas/Email'
          method:
            enum:
            - password
            type: string
          username:
            $ref: '#/components/schemas/Username'
        required:
        - method
        - at
        title: 'Authenticated by username/email login

          '
        type: object
      - properties:
          at:
            $ref: '#/components/schemas/Timestamp'
          email:
            $ref: '#/components/schemas/Email'
          method:
            enum:
            - password_reset
            type: string
        required:
        - at
        - email
        - method
        title: 'Authenticated after password reset

          '
        type: object
      - properties:
          at:
            $ref: '#/components/schemas/Timestamp'
          email:
            $ref: '#/components/schemas/Email'
          method:
            enum:
            - code
            type: string
        required:
        - at
        - email
        - method
        title: 'Authenticated by confirming a code sent by email.

          '
        type: object
      - properties:
          at:
            $ref: '#/components/schemas/Timestamp'
          method:
            enum:
            - code
            type: string
          phone:
            $ref: '#/components/schemas/Phone'
        required:
        - at
        - method
        - phone
        title: 'Authenticated by confirming a code sent by phone.

          '
        type: object
      - properties:
          at:
            $ref: '#/components/schemas/Timestamp'
          method:
            enum:
            - password
            type: string
          reauthenticated:
            enum:
            - true
            type: boolean
        required:
        - method
        - reauthenticated
        - at
        title: 'Reauthenticated by password

          '
        type: object
      - properties:
          at:
            $ref: '#/components/schemas/Timestamp'
          method:
            enum:
            - socialaccount
            type: string
          provider:
            $ref: '#/components/schemas/ProviderID'
          uid:
            $ref: '#/components/schemas/ProviderAccountID'
        required:
        - method
        - reauthenticated
        - at
        - provider
        - uid
        title: 'Authenticated by third-party provider

          '
        type: object
      - properties:
          at:
            $ref: '#/components/schemas/Timestamp'
          method:
            enum:
            - mfa
            type: string
          reauthenticated:
            type: boolean
          type:
            $ref: '#/components/schemas/AuthenticatorType'
        required:
        - method
        - at
        - type
        title: '(Re)authenticated by 2FA

          '
        type: object
    AuthenticationResponse:
      description: 'An authentication related response.

        '
      properties:
        data:
          properties:
            flows:
              items:
                $ref: '#/components/schemas/Flow'
              type: array
          required:
          - flows
          type: object
        meta:
          $ref: '#/components/schemas/AuthenticationMeta'
        status:
          enum:
          - 401
          type: integer
      required:
      - status
      - data
      - meta
      type: object
    AuthenticatorCode:
      description: 'An authenticator code.

        '
      example: '314159'
      type: string
    AuthenticatorID:
      description: 'Authenticator ID.

        '
      example: 123
      type: integer
    AuthenticatorList:
      items:
        oneOf:
        - $ref: '#/components/schemas/TOTPAuthenticator'
        - $ref: '#/components/schemas/RecoveryCodesAuthenticator'
        - $ref: '#/components/schemas/WebAuthnAuthenticator'
      type: array
    AuthenticatorType:
      description: 'The type of authenticator.

        '
      enum:
      - recovery_codes
      - totp
      - webauthn
      type: string
    BaseAuthenticationMeta:
      properties:
        access_token:
          description: 'The access token (`app` clients only).

            '
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW
          type: string
        session_token:
          description: 'The session token (`app` clients only).

            '
          example: ufwcig0zen9skyd545jc0fkq813ghar2
          type: string
      type: object
    BaseAuthenticator:
      properties:
        created_at:
          $ref: '#/components/schemas/Timestamp'
        last_used_at:
          $ref: '#/components/schemas/OptionalTimestamp'
      required:
      - created_at
      - last_used_at
      type: object
    BaseSignup:
      properties:
        email:
          $ref: '#/components/schemas/Email'
        username:
          $ref: '#/components/schemas/Username'
      required:
      - email
      - username
      type: object
    ClientID:
      description: 'The client ID (in case of OAuth2 or OpenID Connect based providers)

        '
      example: 123.apps.googleusercontent.com
      type: string
    Code:
      description: 'An one-time code.

        '
      example: NQ3TM5
      type: string
    ConfigurationResponse:
      example:
        data:
          account:
            authentication_method: email
          mfa:
            supported_types:
            - recovery_codes
            - totp
          socialaccount:
            providers:
            - client_id: 123.apps.googleusercontent.com
              flows:
              - provider_redirect
              - provider_token
              id: google
              name: Google
              openid_configuration_url: https://accounts.google.com/.well-known/openid-configuration
          usersessions:
            track_activity: false
        status: 200
      properties:
        data:
          properties:
            account:
              $ref: '#/components/schemas/AccountConfiguration'
            mfa:
              $ref: '#/components/schemas/MFAConfiguration'
            socialaccount:
              $ref: '#/components/schemas/SocialAccountConfiguration'
            usersessions:
              $ref: '#/components/schemas/UserSessionsConfiguration'
          required:
          - account
          type: object
        status:
          $ref: '#/components/schemas/StatusOK'
      required:
      - status
      - data
      type: object
    ConfirmLoginCode:
      properties:
        code:
          $ref: '#/components/schemas/Code'
      required:
      - code
      type: object
    ConflictResponse:
      properties:
        status:
          enum:
          - 409
          type: integer
      required:
      - status
      type: object
    Email:
      description: 'The email address.

        '
      example: email@domain.org
      type: string
    EmailAddress:
      properties:
        email:
          $ref: '#/components/schemas/Email'
        primary:
          example: true
          type: boolean
        verified:
          example: false
          type: boolean
      required:
      - email
      - primary
      - verified
      type: object
    EmailVerificationInfo:
      properties:
        data:
          properties:
            email:
              $ref: '#/components/schemas/Email'
            user:
              $ref: '#/components/schemas/User'
          required:
          - email
          - user
          type: object
        meta:
          properties:
            is_authenticating:
              type: boolean
          required:
          - is_authenticating
          type: object
        status:
          $ref: '#/components/schemas/StatusOK'
      required:
      - status
      - data
      - meta
      type: object
    EndSessions:
      properties:
        sessions:
          description: 'The IDs of the sessions that are to be ended.

            '
          items:
            example: 123
            type: integer
          type: array
      required:
      - sessions
      type: object
    ErrorResponse:
      properties:
        errors:
          items:
            properties:
              code:
                description: 'An error code.

                  '
                example: invalid
                type: string
              message:
                description: 'A human readable error message.

                  '
                example: Enter a valid email address.
                type: string
              param:
                description: 'The name of the input parameter that was incorrect.

                  '
                example: email
                type: string
            required:
            - code
            - message
            type: object
          type: array
        status:
          enum:
          - 400
          example: 400
          type: integer
      type: object
    Flow:
      properties:
        id:
          enum:
          - login
          - login_by_code
          - mfa_authenticate
          - mfa_reauthenticate
          - provider_redirect
          - provider_signup
          - provider_token
          - reauthenticate
          - signup
          - verify_email
          - verify_phone
          type: string
        is_pending:
          enum:
          - true
          type: boolean
        provider:
          $ref: '#/components/schemas/Provider'
        types:
          description: Matches `settings.MFA_SUPPORTED_TYPES`.
          items:
            $ref: '#/components/schemas/AuthenticatorType'
          type: array
      required:
      - id
      type: object
    ForbiddenResponse:
      properties:
        status:
          enum:
          - 403
          type: integer
      required:
      - status
      type: object
    Login:
      allOf:
      - properties:
          password:
            $ref: '#/components/schemas/Password'
        required:
        - password
        type: object
      - anyOf:
        - properties:
            username:
              $ref: '#/components/schemas/Username'
          required:
          - username
          title: Login by username
        - properties:
            email:
              $ref: '#/components/schemas/Email'
          required:
          - email
          title: Login by email
        - properties:
            phone:
              $ref: '#/components/schemas/Phone'
          required:
          - phone
          title: Login by phone
    MFAAuthenticate:
      properties:
        code:
          $ref: '#/components/schemas/AuthenticatorCode'
      required:
      - code
      type: object
    MFAConfiguration:
      description: 'Configuration of the Django `allauth.mfa` app.

        '
      properties:
        supported_types:
          description: 'Matches `settings.MFA_SUPPORTED_TYPES`.

            '
          items:
            $ref: '#/components/schemas/AuthenticatorType'
          type: array
      required:
      - supported_types
      type: object
    MFATrust:
      properties:
        trust:
          type: boolean
      required:
      - trust
      type: object
    OptionalTimestamp:
      $ref: '#/components/schemas/Timestamp'
      nullable: true
    PasskeySignup:
      allOf:
      - $ref: '#/components/schemas/BaseSignup'
    Password:
      description: 'The password.

        '
      example: Alohomora!
      type: string
    Phone:
      description: 'The phone number.

        '
      example: '+314159265359'
      type: string
    PhoneNumber:
      description: 'A phone number.

        '
      properties:
        phone:
          example: '+314159265359'
          type: string
        verified:
          type: boolean
      required:
      - phone
      - verified
      type: object
    PhoneNumberChangeResponse:
      example:
        data:
        - phone: '+314159265359'
          verified: false
        status: 202
      properties:
        data:
          items:
            $ref: '#/components/schemas/PhoneNumber'
          type: array
        status:
          $ref: '#/components/schemas/StatusAccepted'
      required:
      - status
      - data
      type: object
    PhoneNumbersResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PhoneNumber'
          type: array
        status:
          $ref: '#/components/schemas/StatusOK'
      required:
      - status
      - data
      type: object
    Process:
      description: 'The process to be executed when the user successfully

        authenticates. When set to `login`, the user will be logged into the

        account to which the provider account is connected, or if no such

        account exists, a signup will occur. If set to `connect`, the provider

        account will be connected to the list of provider accounts for the

        currently authenticated user.

        '
      enum:
      - login
      - connect
      example: login
      type: string
    Provider:
      properties:
        client_id:
          description: 'The client ID (in case of OAuth2 or OpenID Connect based providers)

            '
          example: 123.apps.googleusercontent.com
          type: string
        flows:
          description: 'The authentication flows the provider integration supports.

            '
          items:
            enum:
            - provider_redirect
            - provider_token
            type: string
          type: array
        id:
          description: 'The provider ID.

            '
          example: google
          type: string
        name:
          description: 'The name of the provider.

            '
          example: Google
          type: string
        openid_configuration_url:
          description: 'The OIDC discovery or well-known URL (in case of OAuth2 or
            OpenID Connect based providers)

            '
          example: https://accounts.google.com/.well-known/openid-configuration
          type: string
      required:
      - id
      - name
      - flows
      type: object
    ProviderAccount:
      properties:
        display:
          description: 'A name derived from the third-party provider account data.

            '
          example: Wizzkid
          type: string
        provider:
          $ref: '#/components/schemas/Provider'
        uid:
          $ref: '#/components/schemas/ProviderAccountID'
      required:
      - uid
      - provider
      - display
      type: object
    ProviderAccountID:
      description: 'The provider specific account ID.

        '
      example: goo12345
      type: string
    ProviderID:
      description: 'The provider ID.

        '
      example: google
      type: string
    ProviderList:
      items:
        $ref: '#/components/schemas/Provider'
      type: array
    ProviderRedirect:
      properties:
        callback_url:
          description: "The URL to return to after the redirect flow is complete.\n\
            \nNote that this is not to be mistaken with the callback URL that you\n\
            configure over at the OAuth provider during the OAuth app/client\nsetup.\
            \ The flow is as follows:\n\n  1. Your frontend redirects to the headless\
            \ provider redirect\n     endpoint in a synchronous (non-XHR) manner,\
            \ informing allauth\n     (by means of `callback_url`) where to redirect\
            \ to after the\n     provider handshake is completed.\n\n  2. Headless\
            \ will redirect to the (OAuth) identity provider to\n     initiate the\
            \ handshake, passing along a different callback URL\n     to the provider:\
            \ one that points to an allauth backend URL.\n     This is the URL that\
            \ you need to have setup at your OAuth\n     app/client configuration.\
            \ Note that this must be a backend URL\n     as providers can use POST\
            \ requests to perform their callbacks,\n     which is something a frontend\
            \ would not be able to handle.\n\n  3. After the authorization at the\
            \ provider is completed, the\n     provider redirects to the *backend*\
            \ allauth callback URL, which\n     will then redirect back to the *frontend*\
            \ callback URL.\n\n  4. Your frontend is now expected to fetch the current\
            \ session to\n     determine what the next course of action is. The user\
            \ could be\n     authenticated at this point, or another flow is pending\n\
            \     (e.g. email verification, or, provider signup). In case of\n   \
            \  errors a `?error=` is passed to the frontend callback URL.\n"
          example: https://app.project.org/account/provider/callback
          type: string
        process:
          $ref: '#/components/schemas/Process'
        provider:
          $ref: '#/components/schemas/ProviderID'
      required:
      - provider
      - process
      - callback_url
      type: object
    ProviderSignup:
      allOf:
      - $ref: '#/components/schemas/BaseSignup'
    ProviderToken:
      properties:
        process:
          $ref: '#/components/schemas/Process'
        provider:
          $ref: '#/components/schemas/ProviderID'
        token:
          description: 'The token.

            '
          properties:
            access_token:
              description: 'The access token.

                '
              example: 36POk6yJV_adQs
              type: string
            client_id:
              $ref: '#/components/schemas/ClientID'
            id_token:
              description: 'The ID token.

                '
              example: eyJhbGciOiJI
              type: string
          required:
          - client_id
          type: object
      required:
      - provider
      - process
      - token
      type: object
    Reauthenticate:
      properties:
        password:
          $ref: '#/components/schemas/Password'
      required:
      - password
      type: object
    ReauthenticationRequired:
      properties:
        flows:
          items:
            $ref: '#/components/schemas/Flow'
          type: array
        methods:
          description: 'A list of methods used to authenticate.

            '
          items:
            $ref: '#/components/schemas/AuthenticationMethod'
          type: array
        user:
          $ref: '#/components/schemas/User'
      required:
      - flows
      - user
      - methods
      type: object
    ReauthenticationResponse:
      description: 'A response indicating reauthentication is required.

        '
      properties:
        data:
          $ref: '#/components/schemas/ReauthenticationRequired'
        meta:
          $ref: '#/components/schemas/AuthenticatedMeta'
        status:
          enum:
          - 401
          type: integer
      required:
      - status
      - data
      - meta
      type: object
    RecoveryCodesAuthenticator:
      allOf:
      - $ref: '#/components/schemas/BaseAuthenticator'
      - properties:
          total_code_count:
            description: 'The total number of recovery codes that initially were available.

              '
            example: 10
            type: integer
          type:
            description: 'The authenticator type.

              '
            enum:
            - recovery_codes
            type: string
          unused_code_count:
            description: 'The number of recovery codes that are unused.

              '
            example: 7
            type: integer
        required:
        - type
        - total_code_count
        - unused_code_count
        type: object
    RefreshToken:
      description: 'The refresh token.

        '
      example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.QV30
      type: string
    RequestLoginCode:
      anyOf:
      - properties:
          phone:
            $ref: '#/components/schemas/Phone'
        required:
        - phone
        title: Request login code (phone)
      - properties:
          email:
            $ref: '#/components/schemas/Email'
        required:
        - email
        title: Request login code (email)
      type: object
    RequestPassword:
      properties:
        email:
          $ref: '#/components/schemas/Email'
      required:
      - email
      type: object
    ResetPassword:
      properties:
        key:
          description: The password reset key
          example: 2f-c4nqd4-e07d9bc694f9f28cd4fe92569d495333
          type: string
        password:
          $ref: '#/components/schemas/Password'
      required:
      - key
      - password
      type: object
    SensitiveRecoveryCodesAuthenticator:
      allOf:
      - $ref: '#/components/schemas/RecoveryCodesAuthenticator'
      - properties:
          unused_codes:
            description: 'The list of unused codes.

              '
            items:
              $ref: '#/components/schemas/AuthenticatorCode'
            type: array
        required:
        - unused_codes
        type: object
    Session:
      properties:
        created_at:
          $ref: '#/components/schemas/Timestamp'
        id:
          example: 123
          type: integer
        ip:
          example: 127.2.3.192
          type: string
        is_current:
          type: boolean
        last_seen_at:
          $ref: '#/components/schemas/Timestamp'
        user_agent:
          example: Mozilla Firefox
          type: string
      required:
      - user_agent
      - ip
      - created_at
      - is_current
      - id
      type: object
    SessionGoneResponse:
      description: 'The session is expired or invalid.

        '
      properties:
        data:
          type: object
        meta:
          $ref: '#/components/schemas/AuthenticationMeta'
        status:
          enum:
          - 410
          type: integer
      required:
      - status
      - data
      - meta
      type: object
    Signup:
      allOf:
      - $ref: '#/components/schemas/BaseSignup'
      - properties:
          password:
            $ref: '#/components/schemas/Password'
        required:
        - password
        type: object
    SocialAccountConfiguration:
      description: 'Configuration of the Django `allauth.socialaccount` app.

        '
      properties:
        providers:
          $ref: '#/components/schemas/ProviderList'
      required:
      - providers
      type: object
    StatusAccepted:
      enum:
      - 202
      type: integer
    StatusOK:
      enum:
      - 200
      type: integer
    TOTPAuthenticator:
      allOf:
      - $ref: '#/components/schemas/BaseAuthenticator'
      - properties:
          type:
            enum:
            - totp
            type: string
        required:
        - type
        type: object
    Timestamp:
      description: 'An epoch based timestamp (trivial to parse using: `new Date(value)*1000`)

        '
      example: 1711555057.065702
      type: number
    User:
      properties:
        display:
          description: The display name for the user.
          example: Magic Wizard
          type: string
        email:
          description: The email address.
          example: email@domain.org
          type: string
        has_usable_password:
          description: Whether or not the account has a password set.
          example: true
          type: boolean
        id:
          description: The user ID.
          example: 123
          type: integer
        username:
          description: The username.
          example: wizard
          type: string
      required:
      - display
      - has_usable_password
      - username
      type: object
    UserSessionsConfiguration:
      description: 'Configuration of the Django `allauth.usersessions` app.

        '
      properties:
        track_activity:
          description: 'Matches `settings.USERSESSIONS_TRACK_ACTIVITY`.

            '
          type: boolean
      required:
      - track_activity
      type: object
    Username:
      description: 'The username.

        '
      example: wizard
      type: string
    VerifyEmail:
      properties:
        key:
          description: The email verification key
          example: 2f-c4nqd4-e07d9bc694f9f28cd4fe92569d495333
          type: string
      required:
      - key
      type: object
    VerifyPhone:
      properties:
        code:
          description: The phone verification code
          example: 4S3H82
          type: string
      required:
      - code
      type: object
    WebAuthnAuthenticator:
      allOf:
      - $ref: '#/components/schemas/BaseAuthenticator'
      - properties:
          id:
            $ref: '#/components/schemas/AuthenticatorID'
          is_passwordless:
            description: 'Whether or not this authenticator represents a passkey.
              Absent if it is not specified.

              '
            type: boolean
          name:
            example: Master key
            type: string
          type:
            enum:
            - webauthn
            type: string
        required:
        - type
        - id
        - name
        type: object
    WebAuthnCredential:
      example:
        credential:
          authenticatorAttachment: cross-platform
          clientExtensionResults: {}
          id: -J4JNfPfnLyRSMK4R...
          rawId: -J4JNfPfnLyRSMK4R...
          response:
            authenticatorData: SZYN5YgO...
            clientDataJSON: eyJjaGFsbGVuZ2UiOi...
            signature: MEUCIE-7sqILygPqGbrRZ4j2nqeqUU...
            userHandle: Mg...
          type: public-key
      type: object
    WebAuthnCredentialCreationOptions:
      properties:
        creation_options:
          example:
            data:
              request_options:
                publicKey:
                  allowCredentials: []
                  challenge: aOecJJtLA2e-Dj2WU-zbRoJewbQqSUPxoA9EzsUL72o
                  rpId: localhost
                  userVerification: preferred
            status: 200
          type: object
      required:
      - creation_options
      type: object
    WebAuthnCredentialRequestOptions:
      properties:
        request_options:
          example:
            data:
              request_options:
                publicKey:
                  allowCredentials: []
                  challenge: aOecJJtLA2e-Dj2WU-zbRoJewbQqSUPxoA9EzsUL72o
                  rpId: localhost
                  userVerification: preferred
            status: 200
          type: object
      required:
      - request_options
      type: object
externalDocs:
  description: The django-allauth project.
  url: http://allauth.org
info:
  contact:
    email: info@allauth.org
  description: "# Introduction\n\nWelcome to the django-allauth API specification.\
    \ This API is intended to be\nconsumed by two different kind of clients:\n\n-\
    \ Web applications running in a **browser** context. For example, a\n  single-page\
    \ React application, to which the end user can navigate using a web\n  browser.\n\
    \n- Applications, **apps** for short, executing in non-browser contexts. For example,\n\
    \  a mobile Android or iOS application.\n\nThe security considerations for these\
    \ two usage types are different. In a\nbrowser context, cookies play a role. \
    \ Without taking special precautions, your\nweb application may be vulnerable\
    \ to Cross-Site Request Forgery attacks.  For\nmobile applications, this does\
    \ not apply.\n\nThe API can be used for both use cases. Differences in handling\
    \ of security is\nautomatically adjusted for, based on the request path used to\
    \ make the API call.\nFor example, signing up can either be done using the\n`/_allauth/browser/v1/auth/signup`\
    \ or the `/_allauth/app/v1/auth/signup`\nendpoint. For the **browser** usage,\
    \ session cookies and CSRF protection\napplies. For the **app** usage, cookies\
    \ play no role, instead, a session token\nis used.  The paths of all endpoints\
    \ are documented in the form of\n`/_allauth/{client}/v1/auth/signup`. Depending\
    \ on the client type (`{client}`),\nthere may be slight differences in request/response\
    \ handling.  This is\ndocumented where applicable.\n\n\n# Scope\n\nThe following\
    \ functionality is all in scope and handled as part of this API:\n\n- Regular\
    \ accounts:\n  - Login\n  - Signup\n  - Password forgotten\n  - Manage email (add,\
    \ remove, verify, select a different primary)\n  - Change password.\n  - Verification\
    \ of email addresses.\n- Two-Factor Authentication:\n  - Authentication using\
    \ an authenticator code\n  - (De)activate TOTP\n  - (Re)generate recovery codes\n\
    \  - \"Trust this browser\"\n- Third-party providers:\n  - Authenticate by performing\
    \ a browser-level redirect (synchronous request).\n  - Authenticate by means of\
    \ a provider token.\n  - Connect additional provider accounts.\n  - Disconnect\
    \ existing provider accounts.\n  - Setting a password in case no password was\
    \ set, yet.\n  - Querying additional information before signing up.\n- Session\
    \ management:\n  - Listing all sessions for a user.\n  - Signing out of any of\
    \ those sessions.\n\n\n# Browser Usage\n\nFor web applications running in a browser,\
    \ routing needs to be setup correctly\nsuch that the sessions initiated at the\
    \ backend are accessible in the frontend.\n\n## Routing\n\nWhen using the API\
    \ in a browser context, regular Django sessions are used, along\nwith the usual\
    \ session cookies. There are several options for setting up the\nrouting of your\
    \ application.\n\n\n###  Single Domain Routing\n\nWith single domain, path-based\
    \ routing, both your frontend and backend are\nserved from the same domain, for\
    \ example `https://app.org`. You will have to\nmake sure that some paths are served\
    \ by the frontend, and others by the backend.\n\n\n### Sub-domain Routing\n\n\
    With sub-domain based routing, the frontend and backend are served from\ndifferent\
    \ domains.  However, as session cookies are used, these different\ndomains must\
    \ share common main domain.\n\nFor example, you may use `app.project.org` for\
    \ the frontend, which\ninterfaces with the backend over at `backend.project.org`.\
    \  In this\nsetup, Django will need to be configured with:\n\n```\nSESSION_COOKIE_DOMAIN\
    \ = \"project.org\"\nCSRF_COOKIE_DOMAIN = \"project.org\"\n```\n\nIf your organization\
    \ hosts unrelated applications, for example, a CMS for\nmarketing purposes, on\
    \ the top level domain (`project.org`), it is not advisable\nto set the session\
    \ cookie domain to `project.org`, as those other applications\ncould get access\
    \ to the session cookie. In that case, it is advised to use\n`backend.app.project.org`\
    \ for the backend, and set the session cookie domain to\n`app.project.org`.\n\n\
    \n# App Usage\n\nFor app based usage, cookies play no role, yet, sessions are\
    \ still used. When a\nuser walks through the authentication flow, a session is\
    \ created.  Having an\nauthenticated session is proof that the user is allowed\
    \ to further interact with\nthe backend. Unauthenticated sessions are also needed\
    \ to remember state while\nthe user proceeds to go over the required steps necessary\
    \ to authenticate.\n\n\n## Session Tokens\n\nGiven that there is no cookie to\
    \ point to the session, the header\n`X-Session-Token` is used instead. The way\
    \ of working is as follows:\n\n- If you do not have a session token yet, do not\
    \ send the `X-Session-Token` header.\n\n- When making requests, session tokens\
    \ can appear in the metadata\n  (`meta.session_token`) of authentication related\
    \ responses. If a session\n  token appears, store it (overwriting any previous\
    \ session token), and ensure\n  to add the token to the `X-Session-Token` header\
    \ of all subsequent requests.\n\n- When receiving an authentication related response\
    \ with status code 410\n  (`Gone`), that is meant to indicate that the session\
    \ is no longer valid.\n  Remove the session token and start clean.\n\n\n## Access\
    \ Tokens\n\nWhile session tokens are required to handle the authentication process,\n\
    depending on your requirements, a different type of token may be needed once\n\
    authenticated.\n\nFor example, your app likely needs access to other APIs as well.\
    \ These APIs may\n even be implemented using different technologies, in which\
    \ case having a\n stateless token, possibly a JWT encoding the user ID, might\
    \ be a good fit.\n\nIn this API and its implementation no assumptions, and no\
    \ (limiting) design\ndecisions are made in this regard. The token strategy of\
    \ django-allauth is\npluggable, such that you can expose your own access token\
    \ when the user\nauthenticates. As for as the API specification is concerned,\
    \ the access token\nwill appear in the response of metadata (`meta.access_token`)\
    \ of a successful\nauthentication request. How you can customize the token strategy\
    \ can be found\nover at the documentation of the `allauth.headless` Django application.\n\
    \n\n# Responses\n\nUnless documented otherwise, responses are objects with the\
    \ following\nproperties:\n- The `status`, matching the HTTP status code.\n- Data,\
    \ if any, is returned as part of the `data` key.\n- Metadata, if any, is returned\
    \ as part of the `meta` key.\n- Errors, if any, are listed in the `errors` key.\n\
    \n\n# Authentication Flows\n\nIn order to become authenticated, the user must\
    \ complete a flow, potentially\nconsisting of several steps. For example:\n- A\
    \ login, after which the user is authenticated.\n- A Login, followed by two-factor\
    \ authentication, after which the user is\n  authenticated.\n- A signup, followed\
    \ by mandatory email verification, after which the user is\n  authenticated.\n\
    \nThe API signals to the client that (re)authentication is required by means of\
    \ a\n`401` or `410` status code:\n- Not authenticated: status `401`.\n- Re-authentication\
    \ required: status `401`, with `meta.is_authenticated = true`.\n- Invalid session:\
    \ status `410`. This only occurs for clients of type `app`.\n\nAll authentication\
    \ related responses have status `401` or `410`, and,\n`meta.is_authenticated`\
    \ indicating whether authentication, or re-authentication\nis required.\n\nThe\
    \ flows the client can perform to initiate or complete the authentication are\n\
    communicates as part of authentication related responses. The authentication can\n\
    be initiated by means of these flows:\n- Login using a local account (`login`).\n\
    - Signup for a local account (`signup`).\n- Login or signup using the third-party\
    \ provider redirect flow (`provider_redirect`).\n- Login or signup by handing\
    \ over a third-party provider retrieved elsewhere (`provider_token`).\n- Login\
    \ using a special code (`login_by_code`).\n- Login using a passkey (`mfa_login_webauthn`).\n\
    - Signup using a passkey (`mfa_signup_webauthn`).\n\nDepending on the state of\
    \ the account, and the configuration of django-allauth, the flows above\ncan either\
    \ lead to becoming directly authenticated, or, to followup flows:\n- Provider\
    \ signup (`provider_signup`).\n- Email verification (`verify_email`).\n- Phone\
    \ verification (`phone_email`).\n- Two-factor authentication required (TOTP, recovery\
    \ codes, or WebAuthn) (`mfa_authenticate`).\n- Trust this browser (`mfa_trust`).\n\
    \nWhile authenticated, re-authentication may be required to safeguard the account\
    \ when sensitive actions\nare performed. The re-authentication flows are the following:\n\
    - Re-authenticate using password (`reauthenticate`).\n- Re-authenticate using\
    \ a 2FA authenticator (TOTP, recovery codes, or WebAuthn) (`mfa_reauthenticate`).\n\
    \n\n# Security Considerations\n\n## Input Sanitization\n\nThe Django framework,\
    \ by design, does *not* perform input sanitization. For\nexample, there is nothing\
    \ preventing end users from signing up using `<script>`\nor `Robert'); DROP TABLE\
    \ students` as a first name. Django relies on its\ntemplate language for proper\
    \ escaping of such values and mitigate any XSS\nattacks.\n\nAs a result, any `allauth.headless`\
    \ client **must** have proper XSS protection\nin place as well. Be prepared that,\
    \ for example, the WebAuthn endpoints could\nreturn authenticator names as follows:\n\
    \n    {\n      \"name\": \"<script>alert(1)</script>\",\n      \"credential\"\
    : {\n        \"type\": \"public-key\",\n        ...\n      }\n    }"
  license:
    name: MIT
    url: https://opensource.org/license/mit
  title: 'django-allauth: Headless API'
  version: '1'
openapi: 3.0.3
paths:
  /auth-api/app/v1/tokens/refresh:
    post:
      description: 'Used to retrieve a new access token. Depending on `settings.HEADLESS_JWT_ROTATE_REFRESH_TOKEN`,

        a new refresh token is returned as well.

        '
      requestBody:
        $ref: '#/components/requestBodies/RefreshToken'
      responses:
        '200':
          $ref: '#/components/responses/RefreshToken'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The refresh token is invalid or expired.
      summary: 'Refresh the access token

        '
      tags:
      - Tokens
  /auth-api/browser/v1/auth/provider/redirect:
    post:
      description: 'Initiates the third-party provider authentication redirect flow.
        As calling

        this endpoint results in a user facing redirect (302), this call is only

        available in a browser, and must be called in a synchronous (non-XHR)

        manner.

        '
      requestBody:
        $ref: '#/components/requestBodies/ProviderRedirect'
      responses:
        '302':
          description: The provider authorization URL to which the client should be
            redirected.
          headers:
            location:
              description: The redirect URL.
              schema:
                type: string
      summary: Provider redirect
      tags:
      - 'Authentication: Providers'
  /auth-api/{client}/v1/account/email:
    delete:
      description: 'Used to remove an email address.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/Email'
      responses:
        '200':
          $ref: '#/components/responses/EmailAddresses'
        '400':
          content:
            application/json:
              examples:
                invalid_code:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
      summary: Remove an email address
      tags:
      - 'Account: Email'
    get:
      description: 'Retrieves the list of email addresses of the account.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '200':
          $ref: '#/components/responses/EmailAddresses'
        '401':
          $ref: '#/components/responses/Authentication'
      summary: List email addresses
      tags:
      - 'Account: Email'
    patch:
      description: 'Used to change primary email address to a different one. Note
        that only verified email addresses

        can be marked as primary.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/MarkPrimaryEmail'
      responses:
        '200':
          $ref: '#/components/responses/EmailAddresses'
        '400':
          content:
            application/json:
              examples:
                invalid_code:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
      summary: Change primary email address
      tags:
      - 'Account: Email'
    post:
      description: "The following functionality is available:\n\n  - Adding a new\
        \ email address for an already signed in user (`ACCOUNT_CHANGE_EMAIL = False`).\n\
        \  - Change to a new email address for an already signed in user   (`ACCOUNT_CHANGE_EMAIL\
        \ = True`).\n  - Change to a new email address during the email verification\
        \ process at signup (`ACCOUNT_EMAIL_VERIFICATION_SUPPORTS_CHANGE = True`).\n\
        \nIn all cases, an email verification mail will be sent containing a link\
        \ or code that needs to be verified.\n"
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/Email'
      responses:
        '200':
          $ref: '#/components/responses/EmailAddresses'
        '400':
          content:
            application/json:
              examples:
                invalid_code:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          $ref: '#/components/responses/AuthenticationOrReauthentication'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. For example, when no user is authenticated and no
            email verification flow is pending.

            '
      summary: 'Add/Change email address

        '
      tags:
      - 'Account: Email'
    put:
      description: 'Requests for (another) email verification email to be sent. Note
        that

        sending emails is rate limited, so when you send too many requests the

        email will not be sent.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/Email'
      responses:
        '200':
          $ref: '#/components/responses/StatusOK'
        '400':
          content:
            application/json:
              examples:
                invalid_code:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
          description: 'Too many email verification mails were already sent.

            '
      summary: Request email verification
      tags:
      - 'Account: Email'
  /auth-api/{client}/v1/account/password/change:
    post:
      description: 'In order to change the password of an account, the current and
        new

        password must be provider.  However, accounts that were created by

        signing up using a third-party provider do not have a password set. In

        that case, the current password is not required.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/ChangePassword'
      responses:
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Authentication'
      summary: Change password
      tags:
      - 'Account: Password'
  /auth-api/{client}/v1/account/phone:
    get:
      description: 'Retrieves the phone number of the account, if any. Note that while
        the

        endpoint returns a list of phone numbers, at most one entry is returned.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '200':
          $ref: '#/components/responses/PhoneNumbers'
        '401':
          $ref: '#/components/responses/Authentication'
      summary: Get the phone number
      tags:
      - 'Account: Phone'
    post:
      description: "The following functionality is available:\n\n- Initiate the phone\
        \ number change process for signed in users.\n- Change to a new phone number\
        \ during the phone number verification\n  process at signup for unauthenticated\
        \ users. Note that this requires:\n  `ACCOUNT_PHONE_VERIFICATION_SUPPORTS_CHANGE\
        \ = True`.\n\nIn both cases, after posting a new phone number, proceed with\
        \ the phone\nverification endpoint to confirm the change of the phone number\
        \ by\nposting the verification code.\n"
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/Phone'
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberChangeResponse'
          description: Phone number change process initiated.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          $ref: '#/components/responses/AuthenticationOrReauthentication'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. For example, when no user is authenticated and no
            phone verification flow is pending.

            '
      summary: 'Change the phone number

        '
      tags:
      - 'Account: Phone'
  /auth-api/{client}/v1/account/providers:
    delete:
      description: 'Disconnect a third-party provider account, returning the remaining

        accounts that are still connected. The disconnect is not allowed if it

        would leave the account unusable. For example, if no password was

        set up yet.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/ProviderAccount'
      responses:
        '200':
          $ref: '#/components/responses/ProviderAccounts'
        '400':
          content:
            application/json:
              examples:
                no_email:
                  $ref: '#/components/examples/DisconnectNotAllowedNoVerifiedEmail'
                no_password:
                  $ref: '#/components/examples/DisconnectNotAllowedNoPassword'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
      summary: 'Disconnect a third-party provider account

        '
      tags:
      - 'Account: Providers'
    get:
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '200':
          $ref: '#/components/responses/ProviderAccounts'
      summary: List the connected third-party provider accounts
      tags:
      - 'Account: Providers'
  /auth-api/{client}/v1/auth/code/confirm:
    post:
      description: 'Use this endpoint to pass along the received "special" login code.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      requestBody:
        $ref: '#/components/requestBodies/ConfirmLoginCode'
      responses:
        '200':
          $ref: '#/components/responses/AuthenticatedByCode'
        '400':
          content:
            application/json:
              examples:
                invalid_code:
                  $ref: '#/components/examples/InvalidAuthenticatorCode'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          content:
            application/json:
              examples:
                unauthenticated_pending_2fa:
                  $ref: '#/components/examples/UnauthenticatedPending2FA'
              schema:
                $ref: '#/components/schemas/AuthenticationResponse'
          description: 'Not authenticated.

            '
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The "login by code" flow is not pending.

            '
      summary: Confirm login code
      tags:
      - 'Authentication: Login By Code'
  /auth-api/{client}/v1/auth/code/request:
    post:
      description: 'Request a "special" login code that is sent to the user by email.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      requestBody:
        $ref: '#/components/requestBodies/RequestLoginCode'
      responses:
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          content:
            application/json:
              examples:
                pending_login_by_code:
                  $ref: '#/components/examples/UnauthenticatedPendingLoginByCode'
              schema:
                $ref: '#/components/schemas/AuthenticationResponse'
          description: 'Not authenticated.

            '
      summary: Request login code
      tags:
      - 'Authentication: Login By Code'
  /auth-api/{client}/v1/auth/code/resend:
    post:
      description: 'Requests a new login code.

        Requires `ACCOUNT_LOGIN_BY_CODE_SUPPORTS_RESEND = True`.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '200':
          $ref: '#/components/responses/StatusOK'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The login verification (by code) flow is not pending.

            '
        '429':
          $ref: '#/components/responses/TooManyRequests'
      summary: Resend login code
      tags:
      - 'Authentication: Login By Code'
  /auth-api/{client}/v1/auth/email/verify:
    get:
      description: 'Obtain email verification information, given the token that was
        sent to

        the user by email.

        '
      parameters:
      - $ref: '#/components/parameters/EmailVerificationKey'
      - $ref: '#/components/parameters/Client'
      responses:
        '200':
          $ref: '#/components/responses/EmailVerificationInfo'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmailVerificationKey'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 'An input error occurred.

            '
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The email verification (by code) flow is not pending.

            '
      summary: Get email verification information
      tags:
      - 'Authentication: Account'
    post:
      description: 'Complete the email verification process. Depending on the configuration,

        email addresses are either verified by opening a link that is sent to

        their email address, or, by inputting a code that is sent. On the API,

        both cases are handled identically. Meaning, the required key is either

        the one from the link, or, the code itself.


        Note that a status code of 401 does not imply failure. It indicates that

        the email verification was successful, yet, the user is still not signed

        in. For example, in case `ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION` is set to

        `False`, a 401 is returned when verifying as part of login/signup.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/VerifyEmail'
      responses:
        '200':
          $ref: '#/components/responses/Authenticated'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmailVerificationKey'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 'An input error occurred.

            '
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The email verification (by code) flow is not pending.

            '
      summary: Verify an email
      tags:
      - 'Authentication: Account'
  /auth-api/{client}/v1/auth/email/verify/resend:
    post:
      description: 'Requests a new email verification code.

        Requires `ACCOUNT_EMAIL_VERIFICATION_SUPPORTS_RESEND = True`.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '200':
          $ref: '#/components/responses/StatusOK'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The email verification (by code) flow is not pending.

            '
        '429':
          $ref: '#/components/responses/TooManyRequests'
      summary: Resend email verification code
      tags:
      - 'Authentication: Account'
  /auth-api/{client}/v1/auth/login:
    post:
      description: 'Login using a username-password or email-password combination.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      requestBody:
        $ref: '#/components/requestBodies/Login'
      responses:
        '200':
          $ref: '#/components/responses/AuthenticatedByPassword'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmail'
                password_mismatch:
                  $ref: '#/components/examples/PasswordMismatch'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          content:
            application/json:
              examples:
                pending_2fa:
                  $ref: '#/components/examples/UnauthenticatedPending2FA'
                pending_email:
                  $ref: '#/components/examples/UnauthenticatedPendingEmailVerification'
              schema:
                $ref: '#/components/schemas/AuthenticationResponse'
          description: 'Not authenticated.

            '
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. For example, when logging in when a user is already
            logged in.

            '
      summary: Login
      tags:
      - 'Authentication: Account'
  /auth-api/{client}/v1/auth/password/request:
    post:
      description: 'Initiates the password reset procedure. Depending on whether or
        not

        `ACCOUNT_PASSWORD_RESET_BY_CODE_ENABLED` is `True`, the procedure is

        either stateless or stateful.


        In case codes are used, it is stateful, and a new

        `password_reset_by_code` flow is started. In this case, on a successful

        password reset request, you will receive a 401 indicating the pending

        status of this flow.


        In case password reset is configured to use (stateless) links, you will

        receive a 200 on a successful password reset request.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      requestBody:
        $ref: '#/components/requestBodies/RequestPassword'
      responses:
        '200':
          $ref: '#/components/responses/StatusOK'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 'An input error occurred.

            '
        '401':
          $ref: '#/components/responses/Authentication'
      summary: Request password
      tags:
      - 'Authentication: Password Reset'
  /auth-api/{client}/v1/auth/password/reset:
    get:
      description: 'Used to obtain information on and validate a password reset key.  The

        key passed is either the key encoded in the password reset URL that the

        user has received per email, or, the password reset code in case of

        `ACCOUNT_PASSWORD_RESET_BY_CODE_ENABLED`. Note that in case of a code,

        the number of requests you can make is limited (by

        `ACCOUNT_PASSWORD_RESET_BY_CODE_MAX_ATTEMPTS`).

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/PasswordResetKey'
      responses:
        '200':
          $ref: '#/components/responses/PasswordResetInfo'
        '400':
          content:
            application/json:
              examples:
                password_reset_key_invalid:
                  $ref: '#/components/examples/InvalidPasswordResetKey'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 'An input error occurred.

            '
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. There is no password reset (by code) flow pending.

            '
      summary: Get password reset information
      tags:
      - 'Authentication: Password Reset'
    post:
      description: 'Perform the password reset, by handing over the password reset
        key and

        the new password. After successfully completing the password reset, the

        user is either logged in (in case `ACCOUNT_LOGIN_ON_PASSWORD_RESET` is

        `True`), or, the user will need to proceed to the login page.  In case

        of the former, a `200` status code is returned, in case of the latter a

        401.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      requestBody:
        $ref: '#/components/requestBodies/ResetPassword'
      responses:
        '200':
          $ref: '#/components/responses/AuthenticatedByPassword'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          $ref: '#/components/responses/Authentication'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. There is no password reset (by code) flow pending.

            '
      summary: Reset password
      tags:
      - 'Authentication: Password Reset'
  /auth-api/{client}/v1/auth/phone/verify:
    post:
      description: 'Complete the phone number verification process. Note that a status
        code

        of 401 does not imply failure. It merely indicates that the phone number

        verification was successful, yet, the user is still not signed in.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/VerifyPhone'
      responses:
        '200':
          $ref: '#/components/responses/Authenticated'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 'An input error occurred.

            '
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The phone verification flow is not pending.

            '
      summary: Verify a phone number
      tags:
      - 'Authentication: Account'
  /auth-api/{client}/v1/auth/phone/verify/resend:
    post:
      description: 'Requests a new phone number verification code.

        Requires `ACCOUNT_PHONE_VERIFICATION_SUPPORTS_RESEND = True`.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '200':
          $ref: '#/components/responses/StatusOK'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The phone verification flow is not pending.

            '
        '429':
          $ref: '#/components/responses/TooManyRequests'
      summary: Resend phone number verification code
      tags:
      - 'Authentication: Account'
  /auth-api/{client}/v1/auth/provider/signup:
    get:
      description: 'If, while signing up using a third-party provider account, there
        is

        insufficient information received from the provider to automatically

        complete the signup process, an additional step is needed to complete

        the missing data before the user is fully signed up and authenticated.

        The information available so far, such as the pending provider account,

        can be retrieved via this endpoint.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      responses:
        '200':
          $ref: '#/components/responses/ProviderSignup'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The provider signup flow is not pending.

            '
      summary: Provider signup information
      tags:
      - 'Authentication: Providers'
    post:
      description: 'If, while signing up using a third-party provider account, there
        is

        insufficient information received from the provider to automatically

        complete the signup process, an additional step is needed to complete

        the missing data before the user is fully signed up and authenticated.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      requestBody:
        $ref: '#/components/requestBodies/ProviderSignup'
      responses:
        '200':
          $ref: '#/components/responses/Authenticated'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          content:
            application/json:
              examples:
                unauthenticated_pending_email_verification:
                  $ref: '#/components/examples/UnauthenticatedPendingEmailVerification'
              schema:
                $ref: '#/components/schemas/AuthenticationResponse'
          description: Not authenticated, more steps are required to be completed.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
          description: 'Forbidden. For example, when signup is closed.

            '
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. The provider signup flow is not pending.

            '
      summary: Provider signup
      tags:
      - 'Authentication: Providers'
  /auth-api/{client}/v1/auth/provider/token:
    post:
      description: 'Authenticates with a third-party provider using provider tokens
        received

        by other means. For example, in case of a mobile app, the authentication

        flow runs completely on the device itself, without any interaction with

        the API. Then, when the (device) authentication completes and the mobile

        app receives an access and/or ID token, it can hand over these tokens

        via this endpoint to authenticate on the server.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/ProviderToken'
      responses:
        '200':
          $ref: '#/components/responses/Authenticated'
        '400':
          content:
            application/json:
              examples:
                invalid_token:
                  $ref: '#/components/examples/InvalidProviderToken'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
        '401':
          content:
            application/json:
              examples:
                unauthenticated_pending_2fa:
                  $ref: '#/components/examples/UnauthenticatedPending2FA'
                unauthenticated_pending_email_verification:
                  $ref: '#/components/examples/UnauthenticatedPendingEmailVerification'
              schema:
                $ref: '#/components/schemas/AuthenticationResponse'
          description: Not authenticated, more steps are required to be completed.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
          description: 'Forbidden. For example, when signup is closed.

            '
      summary: Provider token
      tags:
      - 'Authentication: Providers'
  /auth-api/{client}/v1/auth/reauthenticate:
    post:
      description: 'In order to safeguard the account, some actions require the user
        to be

        recently authenticated.  If you try to perform such an action without

        having been recently authenticated, a `401` status is returned, listing

        flows that can be performed to reauthenticate. One such flow is the flow

        with ID `reauthenticate`, which allows for the user to input the

        password. This is the endpoint related towards that flow.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      requestBody:
        $ref: '#/components/requestBodies/Reauthenticate'
      responses:
        '200':
          $ref: '#/components/responses/AuthenticatedByPassword'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/IncorrectPassword'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An input error occurred.
      summary: Reauthenticate
      tags:
      - 'Authentication: Account'
  /auth-api/{client}/v1/auth/session:
    delete:
      description: 'Logs out the user from the current session.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '401':
          $ref: '#/components/responses/Unauthenticated'
      summary: Logout
      tags:
      - 'Authentication: Current Session'
    get:
      description: 'Retrieve information about the authentication status for the current

        session.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      - $ref: '#/components/parameters/SessionToken'
      responses:
        '200':
          $ref: '#/components/responses/Authenticated'
        '401':
          $ref: '#/components/responses/Authentication'
        '410':
          $ref: '#/components/responses/SessionGone'
      summary: 'Get authentication status

        '
      tags:
      - 'Authentication: Current Session'
  /auth-api/{client}/v1/auth/signup:
    post:
      description: 'Whether or not `username`, `email`, `phone` or combination of
        those are

        required depends on the configuration of django-allauth. Additionally,

        if a custom signup form is used there may be other custom properties

        required.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      requestBody:
        $ref: '#/components/requestBodies/Signup'
      responses:
        '200':
          $ref: '#/components/responses/AuthenticatedByPassword'
        '400':
          content:
            application/json:
              examples:
                invalid_email:
                  $ref: '#/components/examples/InvalidEmail'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 'An input error occurred.

            '
        '401':
          content:
            application/json:
              examples:
                pending_email:
                  $ref: '#/components/examples/UnauthenticatedPendingEmailVerification'
              schema:
                $ref: '#/components/schemas/AuthenticationResponse'
          description: 'Not authenticated.

            '
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
          description: 'Forbidden. For example, when signup is closed.

            '
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
          description: 'Conflict. For example, when signing up while user is logged
            in.

            '
      summary: Signup
      tags:
      - 'Authentication: Account'
  /auth-api/{client}/v1/config:
    get:
      description: 'There are many configuration options that alter the functionality

        and behavior of django-allauth, some of which can also impact the

        frontend. Therefore, relevant configuration options are exposed via

        this endpoint. The data returned is not user/authentication

        dependent. Hence, it suffices to only fetch this data once at boot

        time of your application.

        '
      parameters:
      - $ref: '#/components/parameters/Client'
      responses:
        '200':
          $ref: '#/components/responses/Configuration'
      summary: Get configuration
      tags:
      - Configuration
tags:
- description: 'Exposes information on the configuration of django-allauth.

    '
  name: Configuration
- description: 'All functionality related towards authenticating regular

    username/email-password based accounts.

    '
  name: 'Authentication: Account'
- description: 'The API used for manipulating the email addresses attached to a given

    account. This is intentionally modeled as one endpoint, representing the

    collection of all the email addresses. Note that manipulating one email

    address may affect another.  For example, marking one email address as

    primary implies the previous primary email address is changed as

    well. Also, if django-allauth is configured with `ACCOUNT_CHANGE_EMAIL =

    True`, verifying the email address the user is changing to will cause the

    previous email addres to be removed.

    '
  name: 'Account: Email'
- description: 'The API used for manipulating the phone number attached to a given

    account.

    '
  name: 'Account: Phone'
- description: 'Endpoints that can be used to alter the password for a given account.

    '
  name: 'Account: Password'
- description: 'Management of third-party provider accounts that are connected to
    the

    authenticated account.

    '
  name: 'Account: Providers'
x-tagGroups:
- name: Overall
  tags:
  - Configuration
- name: Authentication
  tags:
  - 'Authentication: Current Session'
  - 'Authentication: Account'
  - 'Authentication: Password Reset'
  - 'Authentication: Providers'
  - 'Authentication: 2FA'
  - 'Authentication: Login By Code'
  - 'Authentication: WebAuthn: Login'
  - 'Authentication: WebAuthn: Signup'
- name: Account
  tags:
  - 'Account: Email'
  - 'Account: Password'
  - 'Account: Phone'
  - 'Account: Providers'
  - 'Account: 2FA'
  - 'Account: WebAuthn'
- name: Tokens
  tags:
  - Tokens
