Skip to main content
Docs

SignInFirstFactor

The SignInFirstFactor type represents the first factor verification strategy that can be used in the sign-in process.

type SignInFirstFactor =
  | EmailCodeFactor
  | EmailLinkFactor
  | PhoneCodeFactor
  | PasswordFactor
  | ResetPasswordPhoneCodeFactor
  | ResetPasswordEmailCodeFactor
  | Web3SignatureFactor
  | OauthFactor
  | SamlFactor
  • Name
    strategy
    Type
    'email_code' | 'email_link' | 'phone_code' | 'password' | 'passkey' | 'reset_password_phone_code' | 'reset_password_email_code' | 'web3_metamask_signature' | 'web3_coinbase_wallet_signature' | 'web3_okx_wallet_signature' | OAuthStrategy | 'saml' | 'enterprise_sso'
    Description

    The strategy of the factor.

  • Name
    emailAddressId
    Type
    string
    Description

    The ID of the email address that a code or link will be sent to. Populated when the strategy is 'email_code', 'email_link', or 'reset_password_email_code'.

  • Name
    phoneNumberId
    Type
    string
    Description

    The ID of the phone number that a code will be sent to. Populated when the strategy is 'phone_code' or 'reset_password_phone_code'.

  • Name
    web3WalletId
    Type
    string
    Description

    The ID of the Web3 wallet that will be used to sign a message. Populated when the strategy is 'web3_metamask_signature', 'web3_coinbase_wallet_signature', or 'web3_okx_wallet_signature'.

  • Name
    safeIdentifier
    Type
    'emailAddress' | 'phoneNumber'
    Description

    The safe identifier of the factor.

    Populated when the strategy is 'email_code', 'email_link', 'phone_code', 'reset_password_email_code', or 'reset_password_phone_code'.

  • Name
    primary
    Type
    boolean
    Description

    Whether the factor is the primary factor.

    Populated when the strategy is 'email_code', 'email_link', 'phone_code', 'web3_metamask_signature', 'web3_coinbase_wallet_signature', 'web3_okx_wallet_signature', 'reset_password_email_code', or 'reset_password_phone_code'.

type EmailCodeFactor = {
  strategy: EmailCodeStrategy
  emailAddressId: string
  safeIdentifier: string
  primary?: boolean
}
type EmailLinkFactor = {
  strategy: EmailLinkStrategy
  emailAddressId: string
  safeIdentifier: string
  primary?: boolean
}
type PhoneCodeFactor = {
  strategy: PhoneCodeStrategy
  phoneNumberId: string
  safeIdentifier: string
  primary?: boolean
  default?: boolean
}
type PasswordFactor = {
  strategy: PasswordStrategy
}
type ResetPasswordPhoneCodeFactor = {
  strategy: ResetPasswordPhoneCodeStrategy
  phoneNumberId: string
  safeIdentifier: string
  primary?: boolean
}
type ResetPasswordEmailCodeFactor = {
  strategy: ResetPasswordEmailCodeStrategy
  emailAddressId: string
  safeIdentifier: string
  primary?: boolean
}
type Web3SignatureFactor = {
  strategy: Web3Strategy
  web3WalletId: string
  primary?: boolean
}
type OauthFactor = {
  strategy: OAuthStrategy
}
type SamlFactor = {
  strategy: SamlStrategy
}

Feedback

What did you think of this content?

Last updated on