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

    Class MfaEnrollmentError

    Error thrown when MFA enrollment fails.

    try {
    await mfa.enroll({
    mfaToken,
    authenticatorTypes: ['otp']
    });
    } catch (error) {
    if (error instanceof MfaEnrollmentError) {
    if (error.cause?.error === 'unsupported_challenge_type') {
    console.error('Tenant does not support OTP enrollment');
    }
    }
    }

    Hierarchy

    • MfaError
      • MfaEnrollmentError
    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 }