MfaVerificationRequiredState class
State indicating that MFA verification is required. The challenge has been sent and the user needs to provide the code.
- Extends
-
MfaState<MfaVerificationRequiredStateParameters>
Constructors
| Mfa |
Creates a new instance of AuthFlowActionRequiredStateBase. |
Properties
| state |
The type of the state. |
Methods
| get |
Gets the channel through which the challenge was sent. |
| get |
Gets the length of the code that the user needs to provide. |
| get |
Gets the target label indicating where the challenge was sent. |
| submit |
Submits the MFA challenge (e.g., OTP code) to complete the authentication. |
Inherited Methods
| request |
Requests an MFA challenge for a specific authentication method. |
Constructor Details
MfaVerificationRequiredState(MfaVerificationRequiredStateParameters)
Creates a new instance of AuthFlowActionRequiredStateBase.
new MfaVerificationRequiredState(stateParameters: MfaVerificationRequiredStateParameters)
Parameters
- stateParameters
-
MfaVerificationRequiredStateParameters
The parameters for the auth state.
Property Details
stateType
The type of the state.
stateType: string
Property Value
string
Method Details
getChannel()
Gets the channel through which the challenge was sent.
function getChannel(): string
Returns
string
The challenge channel (e.g., "email").
getCodeLength()
Gets the length of the code that the user needs to provide.
function getCodeLength(): number
Returns
number
The expected code length.
getSentTo()
Gets the target label indicating where the challenge was sent.
function getSentTo(): string
Returns
string
The challenge target label (e.g., masked email address).
submitChallenge(string)
Submits the MFA challenge (e.g., OTP code) to complete the authentication.
function submitChallenge(challenge: string): Promise<MfaSubmitChallengeResult>
Parameters
- challenge
-
string
The challenge code (e.g., OTP code) entered by the user.
Returns
Promise<MfaSubmitChallengeResult>
Promise that resolves to MfaSubmitChallengeResult.
Inherited Method Details
requestChallenge(string)
Requests an MFA challenge for a specific authentication method.
function requestChallenge(authMethodId: string): Promise<MfaRequestChallengeResult>
Parameters
- authMethodId
-
string
The authentication method ID to use for the challenge.
Returns
Promise<MfaRequestChallengeResult>
Promise that resolves to MfaRequestChallengeResult.
Inherited From MfaState.requestChallenge