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

    Class MfaVerifyError

    Error thrown when MFA verification fails.

    try {
    await mfa.verify({
    mfaToken,
    otp: '123456'
    });
    } catch (error) {
    if (error instanceof MfaVerifyError) {
    if (error.cause?.error === 'invalid_grant') {
    console.error('Invalid or expired verification code');
    }
    }
    }

    Hierarchy

    • MfaError
      • MfaVerifyError
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    error: string
    error_description: string

    Accessors

    Methods

    • Serialize error for HTTP responses. Called automatically by Response.json() and JSON.stringify(). Ensures both SDK and HTTP API consumers get identical shape.

      Returns { error: string; error_description: string }