@auth0/auth0-acul-js - v0.1.0-beta.7
    Preparing search index...

    Class MfaRecoveryCodeChallenge

    Class implementing the MFA Recovery Code Challenge screen functionality.

    Hierarchy

    • BaseContext
      • MfaRecoveryCodeChallenge

    Implements

    Index

    Constructors

    Properties

    screenIdentifier: string = ScreenIds.MFA_RECOVERY_CODE_CHALLENGE

    Methods

    • Continues with the provided recovery code.

      Parameters

      • code: string

        The recovery code entered by the user.

      • Optionalpayload: Classes.CustomOptions

        Optional payload.

      Returns Promise<void>

      import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
      const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
      const handleContinueEnrollment = async () => {
      try {
      await mfaRecoveryCodeChallengeManager.continue('YOUR_RECOVERY_CODE');
      } catch (error) {
      console.error('Error continuing with recovery code:', error);
      }
      }
    • Retrieves the array of transaction errors from the context, or an empty array if none exist.

      Returns Classes.Error[]

      An array of error objects from the transaction context.

    • Navigates to the screen where the user can pick another MFA method.

      Parameters

      Returns Promise<void>

      import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
      const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
      const switchAuthenticator = async () => {
      try {
      await mfaRecoveryCodeChallengeManager.tryAnotherMethod();
      console.log('Switched to another authentication method.');
      } catch (error) {
      console.error('Error switching authenticator:', error);
      }
      };