tfa_email_support
TFA Email is a lightweight plugin that extends the core functionality of the TFA (Two-Factor Authentication) module by adding support for email-based one-time passcodes (OTP) as a second factor.
By default, the TFA module does not include email as a 2FA option. This plugin fills that gap, allowing you to use email as the second step in the login process, without needing SMS, authenticator apps, or third-party integrations.
Features
- Seamless integration with the TFA module
- Sends a one-time passcode (OTP) to the user’s registered email
- Minimal configuration required
- Ideal for sites where email is the most accessible 2FA method
Requirements
- Drupal core
- TFA module
Setup Instructions
Install the TFA module if you haven't already:
composer require drupal/tfa
Install this module (TFA Email plugin)
Enable both modules:
drush en tfa tfa_email_support
Or use the admin UI
Go to:
Admin > Configuration > People > TFA
/admin/config/people/tfa_email_support
In the Default validation plugin dropdown, select:
Email OTP
Save your configuration.