Domain Based 2FA

Last updated on
9 October 2025

In the Two Factor Authentication - TFA / Passwordless Login module, the Domain Based 2FA feature allows you to enable TFA for selected users based on their domain. The domain that is present in the user's email address will be selected. This module is compatible with Drupal 7, Drupal 8, Drupal 9, Drupal 10, and Drupal 11.

Download  Know more  Free Trial

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:
    Path: /admin/config/people/miniorange_2fa/login_settings
    • Activate Two-Factor Authentication
    • Enforce 2FA to end users

Setup Domain Based 2FA:

  • Navigate to the 2FA Policy for End Users tab.
    Path: /admin/config/people/miniorange_2fa/login_settings
  • Scroll down to the 2FA Restrictions section and click on the Domain Based Restriction tab. 
  • Enable the Enable Domain Based 2FA checkbox.
  • In the text field, enter the domains you want to enable 2FA.
  • Click on the Save Settings button.

User Experience:

  • Open a new browser or private window, and navigate to your Drupal site’s login page.
  • Enter your Drupal credentials.
  • After entering your credentials, if the user’s email belongs to a configured domain, 2FA will be invoked; otherwise, the user will be logged in directly.

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: