---
descriptions:
  authentication_factor:
    self: 'The [Authentication Factor](/reference/mfa/factor) object.'
    object: Distinguishes the Authentication Factor object.
    id: The unique ID of the Factor.
    created_at: The timestamp when the Factor was created.
    updated_at: The timestamp when the Factor was last updated.
    type: The type the Factor. Can be either `totp` or `sms`.
    totp: Additional information for `totp` Factors.
    totp_qr_code: Base64 encoded image containing scannable QR code.
    totp_secret: >-
      TOTP secret that can be manually entered into some authenticator apps in
      place of scanning a QR code.
    totp_uri: The `otpauth` URI that is encoded by the provided `qr_code`.
    sms: Additional information for `sms` Factors.
    sms_phone_number: Phone number that the Factor was enrolled with.
reference:
  curl:
    - url: /reference/mfa/factor
      key: authentication_factor
      id: authentication_factor
      title: authentication_factor
      properties:
        - key: object
          type: '"authentication_factor"'
          description: (authentication_factor.object)
        - key: id
          type: string
          description: (authentication_factor.id)
        - key: created_at
          type: string
          description: (authentication_factor.created_at)
        - key: updated_at
          type: string
          description: (authentication_factor.updated_at)
        - key: type
          type: |
            "totp" | "sms"
          description: (authentication_factor.type)
        - key: totp
          type: object
          expanded: true
          optional: true
          properties:
            - key: qr_code
              type: string
              description: (authentication_factor.totp_qr_code)
            - key: secret
              type: string
              description: (authentication_factor.totp_secret)
            - key: uri
              type: string
              description: (authentication_factor.totp_uri)
        - key: sms
          type: object
          expanded: true
          optional: true
          properties:
            - key: phone_number
              type: string
              description: (authentication_factor.sms_phone_number)
  dotnet:
    - url: /reference/mfa/factor
      key: Factor
      id: authentication_factor
      title: class Factor
      properties:
        - key: Object
          type: '"authentication_factor"'
          description: (authentication_factor.object)
        - key: Id
          type: string
          description: (authentication_factor.id)
        - key: CreatedAt
          type: string
          description: (authentication_factor.created_at)
        - key: UpdatedAt
          type: string
          description: (authentication_factor.updated_at)
        - key: Type
          type: |
            "totp" | "sms"
          description: (authentication_factor.type)
        - key: Totp
          type: Totp
          expanded: true
          optional: true
          properties:
            - key: QrCode
              type: string
              description: (authentication_factor.totp_qr_code)
            - key: Secret
              type: string
              description: (authentication_factor.totp_secret)
            - key: Uri
              type: string
              description: (authentication_factor.totp_uri)
        - key: Sms
          type: Sms
          expanded: true
          optional: true
          properties:
            - key: PhoneNumber
              type: string
              description: (authentication_factor.sms_phone_number)
  ruby:
    - url: /reference/mfa/factor
      key: Factor
      id: authentication_factor
      title: class Factor
      properties:
        - key: object
          type: '"authentication_factor"'
          description: (authentication_factor.object)
        - key: id
          type: String
          description: (authentication_factor.id)
        - key: created_at
          type: String
          description: (authentication_factor.created_at)
        - key: updated_at
          type: String
          description: (authentication_factor.updated_at)
        - key: type
          type: |
            "totp" | "sms"
          description: (authentication_factor.type)
        - key: totp
          type: Hash
          expanded: true
          optional: true
          properties:
            - key: qr_code
              type: String
              description: (authentication_factor.totp_qr_code)
            - key: secret
              type: String
              description: (authentication_factor.totp_secret)
            - key: uri
              type: String
              description: (authentication_factor.totp_uri)
        - key: sms
          type: Hash
          expanded: true
          optional: true
          properties:
            - key: phone_number
              type: String
              description: (authentication_factor.sms_phone_number)
  python:
    - url: /reference/mfa/factor
      key: AuthenticationFactor
      id: authentication_factor
      title: AuthenticationFactor
      properties:
        - key: object
          type: '"authentication_factor"'
          description: (authentication_factor.object)
        - key: id
          type: str
          description: (authentication_factor.id)
        - key: created_at
          type: str
          description: (authentication_factor.created_at)
        - key: updated_at
          type: str
          description: (authentication_factor.updated_at)
        - key: type
          type: '"totp" | "sms"'
          description: (authentication_factor.type)
        - key: totp
          type: ExtendedTotpFactor
          expanded: true
          optional: true
          properties:
            - key: qr_code
              type: str
              description: (authentication_factor.totp_qr_code)
            - key: secret
              type: str
              description: (authentication_factor.totp_secret)
            - key: uri
              type: str
              description: (authentication_factor.totp_uri)
        - key: sms
          type: SmsFactor
          expanded: true
          optional: true
          properties:
            - key: phone_number
              type: str
              description: (authentication_factor.sms_phone_number)
  js:
    - url: /reference/mfa/factor
      key: Factor
      id: authentication_factor
      title: interface Factor
      properties:
        - key: object
          type: '"authentication_factor"'
          description: (authentication_factor.object)
        - key: id
          type: string
          description: (authentication_factor.id)
        - key: createdAt
          type: string
          description: (authentication_factor.created_at)
        - key: updatedAt
          type: string
          description: (authentication_factor.updated_at)
        - key: type
          type: |
            "totp" | "sms"
          description: (authentication_factor.type)
        - key: totp
          type: object
          expanded: true
          optional: true
          properties:
            - key: qrCode
              type: string
              description: (authentication_factor.totp_qr_code)
            - key: secret
              type: string
              description: (authentication_factor.totp_secret)
            - key: uri
              type: string
              description: (authentication_factor.totp_uri)
        - key: sms
          type: object
          expanded: true
          optional: true
          properties:
            - key: phoneNumber
              type: string
              description: (authentication_factor.sms_phone_number)
  php:
    - url: /reference/mfa/factor
      key: AuthenticationFactor
      id: authentication_factor
      title: WorkOS\Resource\AuthenticationFactor
      properties:
        - key: object
          type: '"authentication_factor"'
          description: (authentication_factor.object)
        - key: id
          type: string
          description: (authentication_factor.id)
        - key: created_at
          type: string
          description: (authentication_factor.created_at)
        - key: updated_at
          type: string
          description: (authentication_factor.updated_at)
        - key: type
          type: |
            "totp"|"sms"
          description: (authentication_factor.type)
        - key: totp
          type: array
          optional: true
          expanded: true
          properties:
            - key: qr_code
              type: string
              description: (authentication_factor.totp_qr_code)
            - key: secret
              type: string
              description: (authentication_factor.totp_secret)
            - key: uri
              type: string
              description: (authentication_factor.totp_uri)
        - key: sms
          type: array
          optional: true
          expanded: true
          properties:
            - key: phone_number
              type: string
              description: (authentication_factor.sms_phone_number)
  java:
    - url: /reference/mfa/factor
      key: Factor
      id: authentication_factor
      title: class Factor
      properties:
        - key: obj
          type: '"authentication_factor"'
          description: (authentication_factor.object)
        - key: id
          type: String
          description: (authentication_factor.id)
        - key: createdAt
          type: String
          description: (authentication_factor.created_at)
        - key: updatedAt
          type: String
          description: (authentication_factor.updated_at)
        - key: type
          type: |
            "totp" | "sms"
          description: (authentication_factor.type)
        - key: totp
          type: Totp
          optional: true
          expanded: true
          properties:
            - key: qrCode
              type: String
              optional: true
              description: (authentication_factor.totp_qr_code)
            - key: secret
              type: String
              optional: true
              description: (authentication_factor.totp_secret)
            - key: uri
              type: String
              optional: true
              description: (authentication_factor.totp_uri)
        - key: sms
          type: Sms
          optional: true
          expanded: true
          properties:
            - key: phoneNumber
              type: String
              description: (authentication_factor.sms_phone_number)
  go:
    - url: /reference/mfa/factor
      key: Factor
      id: authentication_factor
      title: mfa.Factor
      properties:
        - key: ID
          type: string
          description: (authentication_factor.id)
        - key: CreatedAt
          type: string
          description: (authentication_factor.created_at)
        - key: UpdatedAt
          type: string
          description: (authentication_factor.updated_at)
        - key: Type
          type: mfa.FactorType
          description: (authentication_factor.type)
        - key: TOTP
          type: mfa.TOTPDetails
          optional: true
          expanded: true
          properties:
            - key: qr_code
              type: string
              description: (authentication_factor.totp_qr_code)
            - key: secret
              type: string
              description: (authentication_factor.totp_secret)
            - key: uri
              type: string
              description: (authentication_factor.totp_uri)
        - key: SMSDetails
          type: mfa.SMSDetails
          optional: true
          expanded: true
          properties:
            - key: phone_number
              type: string
              description: (authentication_factor.sms_phone_number)
originalPath: .tmp-workos-clone/packages/docs/content/reference/mfa/factor/index.mdx
---

# Authentication Factor

An object representing an Authentication Factor.

<CodeBlock
  title="Example Authentication Factor"
  file="authentication-factor"
  referenceId="authentication_factor"
/>
