Error thrown when verifying an MFA challenge fails.
try { const tokens = await mfa.verify({ mfaToken: mfaToken, grant_type: 'http://auth0.com/oauth/grant-type/mfa-otp', otp: '123456' });} catch (error) { if (error instanceof MfaVerifyError) { console.log(error.error); // 'invalid_otp' or 'context_not_found' console.log(error.error_description); // Error details }} Copy
try { const tokens = await mfa.verify({ mfaToken: mfaToken, grant_type: 'http://auth0.com/oauth/grant-type/mfa-otp', otp: '123456' });} catch (error) { if (error instanceof MfaVerifyError) { console.log(error.error); // 'invalid_otp' or 'context_not_found' console.log(error.error_description); // Error details }}
Optional
Any other fields from the server's error response (for example auth_session).
auth_session
The error code from the server response.
error
The error_description from the server response.
error_description
Static
Error thrown when verifying an MFA challenge fails.
Example