@auth0/auth0-react
    Preparing search index...

    Class MfaVerifyError

    Error thrown when verifying an MFA challenge fails.

    try {
    const tokens = await mfa.verify({
    mfaToken: mfaToken,
    grant_type: 'http://auth0.com/oauth/grant-type/mfa-otp',
    otp: '123456'
    });
    } catch (error) {
    if (error instanceof MfaVerifyError) {
    console.log(error.error); // 'invalid_otp' or 'context_not_found'
    console.log(error.error_description); // Error details
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • error: string
      • error_description: string

      Returns MfaVerifyError

    Properties

    error: string
    error_description: string
    message: string
    name: string
    stack?: string
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    • Parameters

      • __namedParameters: { error: string; error_description: string }

      Returns MfaError