How to extend 2FA (OTP) timeout
Shield Security's 2FA timeout defaults to 5 minutes. This means that a user must supply their 2FA code(s) within this time or they'll need to start again (re-login).
So, when you login, you must provide your authentication code(s) to complete the login process. If you don't, you can't do anything until the login expires - which defaults to 5 minutes.
Some email providers can be a bit slow at times with their email delivery, and 5 minutes isn't long enough. To provide a bit more time, you can use a filter to extend the timeout to as many minutes as you need.
You can add this filter to your functions.php or anywhere you feel most appropriate.
To do this, please follow these steps (example, adding filter to your Twenty Twenty theme functions.php file):
- Log into your FTP space for this website (we use Filezilla)
- Browse to your active theme folder ./wp-content/themes/your-active-theme
- Locate functions.php file:
- Right click on this file and select to View/Edit
- Open this file and add filter (these lines):
- Change timeout from 5 to i.e. 10 minutes:
- Click to save file changes
2FA timeout will be extended from 5 to 10 minutes:
Note: ShieldPRO is required for this feature. To find out what the extra ShieldPRO features are and how to purchase, please follow this link here.