Error description from Auth0
Encrypted MFA token (constructor param uses camelCase)
OptionalmfaRequirements: MfaRequirementsMFA requirements from Auth0 (constructor param uses camelCase)
Optionalcause: ErrorUnderlying error
Optional ReadonlycauseReadonlycodeReadonlyerrorOriginal Auth0 error code
Readonlyerror_Original Auth0 error description
Optional Readonlymfa_MFA requirements indicating available challenge/enrollment methods
Readonlymfa_Encrypted MFA token to pass to MFA API methods.
Serialize error for HTTP responses. Called automatically by Response.json() and JSON.stringify(). Ensures both SDK and HTTP API consumers get identical shape.
Thrown when getAccessToken requires MFA step-up authentication.
This error is thrown during token refresh when Auth0 returns
mfa_required. The mfa_token property contains an encrypted token that can be used with Auth0's MFA API to complete the authentication challenge.Remarks
The
mfa_tokenis encrypted using the SDK's cookie secret for security. The raw token from Auth0 is never exposed to application code.Supports two consumption paths with identical shape:
Example: Handling MFA required in a route handler
See
Auth0 MFA API