@auth0/nextjs-auth0 - v4.15.0
    Preparing search index...

    Class MfaTokenExpiredError

    Thrown when MFA API methods are called but no context exists in session for the provided encrypted mfa_token.

    This typically occurs when:

    • The session expired between catching MfaRequiredError and calling MFA methods
    • The mfa_token was modified or is from a different session
    • The MFA context was cleaned up due to TTL expiration
    try {
    await auth0.completeMfaChallenge(mfaToken, code);
    } catch (error) {
    if (error instanceof MfaTokenNotFoundError) {
    // Restart MFA flow - context was lost
    redirect("/auth/login?prompt=mfa");
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    Properties

    code: string = "mfa_token_expired"