Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

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;
PropertyTypeDescription
strategystringThe strategy of the factor.
Supports the following values:
  • "email_code"
  • "email_link"
  • "phone_code"
  • "password"
  • "reset_password_phone_code"
  • "reset_password_email_code"
  • "web3_metamask_signature"
  • OAuthStrategy
  • "saml"
emailAddressIdstringThe 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".
phoneNumberIdstringThe ID of the phone number that a code will be sent to. Populated when the strategy is "phone_code" or "reset_password_phone_code".
web3WalletIdstringThe ID of the Web3 wallet that will be used to sign a message. Populated when the strategy is "web3_metamask_signature".
safeIdentifierstringThe safe identifier of the factor.
Supports the following values:
  • "emailAddress"
  • "phoneNumber"

Populated when the strategy is "email_code", "email_link", "phone_code", "reset_password_email_code", or "reset_password_phone_code".
primarybooleanWhether the factor is the primary factor.
Populated when the strategy is "email_code", "email_link", "phone_code", "web3_metamask_signature", "reset_password_email_code", or "reset_password_phone_code".

EmailCodeFactor

type EmailCodeFactor = { strategy: EmailCodeStrategy; emailAddressId: string; safeIdentifier: string; primary?: boolean; };
type EmailLinkFactor = { strategy: EmailLinkStrategy; emailAddressId: string; safeIdentifier: string; primary?: boolean; };

PhoneCodeFactor

type PhoneCodeFactor = { strategy: PhoneCodeStrategy; phoneNumberId: string; safeIdentifier: string; primary?: boolean; default?: boolean; };

PasswordFactor

type PasswordFactor = { strategy: PasswordStrategy; };

ResetPasswordPhoneCodeFactor

type ResetPasswordPhoneCodeFactor = { strategy: ResetPasswordPhoneCodeStrategy; phoneNumberId: string; safeIdentifier: string; primary?: boolean; };

ResetPasswordEmailCodeFactor

type ResetPasswordEmailCodeFactor = { strategy: ResetPasswordEmailCodeStrategy; emailAddressId: string; safeIdentifier: string; primary?: boolean; };

Web3SignatureFactor

type Web3SignatureFactor = { strategy: Web3Strategy; web3WalletId: string; primary?: boolean; };

OauthFactor

type OauthFactor = { strategy: OAuthStrategy; };

SamlFactor

type SamlFactor = { strategy: SamlStrategy; };

Last updated on March 26, 2024

What did you think of this content?

Clerk © 2024