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

    Class MfaChallengeError

    Error thrown when initiating an MFA challenge fails.

    try {
    await mfa.challenge({
    mfaToken,
    challengeType: 'oob',
    authenticatorId: 'sms|dev_abc123'
    });
    } catch (error) {
    if (error instanceof MfaChallengeError) {
    if (error.cause?.error === 'invalid_authenticator_id') {
    console.error('Authenticator not found or not active');
    }
    }
    }

    Hierarchy

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