2FA Recovery Code

Last updated on
8 July 2026

This feature acts as a backup authentication method when a user is unable to access their primary 2FA method. This can happen in situations such as a lost or unavailable device, no access to the authenticator app, or temporary technical issues. In these cases, recovery codes provide a secure way for users to log in and regain access to their accounts. Two Factor Authentication - TFA / Passwordless Login module is compatible with Drupal 7, Drupal 8, Drupal 9, Drupal 10, and Drupal 11.

Download  Know more

Check out the Installation steps: 

Installation Steps

Prerequisites:

  • The module is activated on your Drupal site. (Follow Installation steps)
  • The following checkboxes are enabled in the General 2FA Settings section under the 2FA Policy for End Users tab of the module: admin/config/people/miniorange_2fa/login_settings
    • Activate Two-Factor Authentication
    • Enforce 2FA to end users

Setup Recovery Code 2FA Method:

  • Navigate to the 2FA Policy for End Users tab.

    Path: /admin/config/people/miniorange_2fa/login_settings

  • Expand the General 2FA Settings section and enable the Recovery Codes Authentication checkbox.
  • Users can now generate their recovery codes in their profile section under the 2FA Configuration tab.
  • Click on the user for whom you want to set up recovery codes.
  • Click on the Generate recovery code button.
  • Recovery codes have now been generated successfully. Click on the Download button to save them.

User Experience:

  • After generating the recovery codes, log in to the Drupal site and ensure that the user has configured 2FA.
  • After logging in, you will see the message: “Having trouble logging in? Log in using recovery codes.”
  • Click on the link and enter one of the recovery codes in the recovery code authentication form.

Each code can only be used once.

  • You will be logged in successfully using the Recovery Code Authentication method.

Support:

Contact our 24*7 support team

Feel free to reach out to our Drupal experts at drupalsupport@xecurify.com if you need any sort of assistance.   

 Get In Touch With Us Join Our Slack Channel

back to top Back to top

Help improve this page

Page status: No known problems

You can: