2FA via Email

Receive verification codes via email with automatic security notifications

2FA Email
TOTP
Security Notifications
Email Verification

Overview

The auth_totp_mail module extends 2FA with ability to receive TOTP codes via email instead of authenticator app, suitable for users without smartphones.

Automatically sends security notifications for important activities like enabling/disabling 2FA, login from new device.


Key Features

Key points

  • TOTP codes via email - Receive 6-digit codes via email, valid for 1 hour

  • Security notifications - Auto-email when enabling/disabling 2FA, new device login

  • Invite to enable 2FA - Admins can send email invitations to enable 2FA

  • Enforce 2FA - Configure mandatory 2FA system-wide or per user group

  • Email rate limiting - Max 5 emails/hour to prevent spam

  • Login details - Email includes device info, IP, location


Login with 2FA Email

Steps

  • 1. Enter username and password

  • 2. System sends email with 6-digit code

  • 3. Check email (inbox or spam)

  • 4. Enter code in login form

  • 5. Optional: Check "Remember this device"

  • 6. Login successful


TOTP Code Email

FieldsTrường dữ liệuDescription
SubjectYour verification codeEmail subject
Code1234566-digit code
Valid for1 hourValidity period
DeviceWindowsOperating system
BrowserChromeBrowser
LocationHanoi, VietnamLocation
IP192.168.1.1IP address

Automatic Security Notifications

Notification Types

EventEmail SubjectContent
Enable 2FASecurity Update: 2FA ActivatedNotification that 2FA has been enabled
Disable 2FASecurity Update: 2FA DeactivatedNotification that 2FA has been disabled
New device loginNew Connection to your AccountDevice details, IP, login time
Remove trusted deviceSecurity Update: Device RemovedName of removed device

Invite Users to Enable 2FA (Admin)

Steps

  • 1. Go to Settings → Users & Companies → Users

  • 2. Select user(s) without 2FA

  • 3. Action → Invite to use Two-Factor Authentication

  • 4. Invitation email sent automatically

  • 5. User receives email with 2FA setup link


Enforce 2FA System-wide

Steps

  • 1. Go to Settings → General Settings → Security

  • 2. Enable "Enforce two-factor authentication"

  • 3. Choose policy: Employees only or All users

  • 4. Users without 2FA will be required to set up on login


Email Rate Limiting

Key points

  • Maximum 5 TOTP code emails in 1 hour

  • When exceeded: Error message, must wait 1 hour

  • Tips to avoid: Don't spam "Resend code", check spam folder first


App TOTP vs Email TOTP Comparison

Choosing the Right Method

CriteriaApp TOTPEmail TOTP
SecurityHigh (30s code)Medium (1h code)
ConvenienceFastSlow (wait for email)
RequirementsSmartphone + appEmail
OfflineWorksDoes not work
Limits5 attempts/hour5 emails + 5 attempts/hour
Recommendation✅ Preferred⚠️ Fallback

Troubleshooting

Common Errors

ErrorCauseSolution
No email receivedEmail in spam, wrong address, rate limit exceededCheck spam, verify email, wait 1 hour
Code incorrectCode expired (>1h), entered old codeRequest new code, copy-paste instead of typing
Strange notificationLogin from new deviceIf not you: change password immediately