Class MfaChallengeError

Error thrown when initiating an MFA challenge fails.

Example

try {
const challenge = await mfa.challenge({
mfaToken: mfaToken,
challengeType: 'otp',
authenticatorId: 'otp|dev_123'
});
} catch (error) {
if (error instanceof MfaChallengeError) {
console.log(error.error); // 'too_many_attempts'
console.log(error.error_description); // 'Rate limit exceeded'
}
}

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

data?: Record<string, any>

Any other fields from the server's error response (for example auth_session).

error: string

The error code from the server response.

error_description: string

The error_description from the server response.

Methods