Skip to content

Instantly share code, notes, and snippets.

@paulgoodchild
Last active May 17, 2024 13:15
Show Gist options
  • Select an option

  • Save paulgoodchild/870d8b6805662b0de6c75ed1966385ae to your computer and use it in GitHub Desktop.

Select an option

Save paulgoodchild/870d8b6805662b0de6c75ed1966385ae to your computer and use it in GitHub Desktop.
Increase Shield Security's 2FA timeout
<?php
/**
* 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).
*
* 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.
*
* Reference: https://support.getshieldsecurity.com/support/solutions/articles/3000101220
*
* Note: The older filter name was "icwp-wpsf-login_intent_timeout". If you're using this
* please update your integration to use the filter name below.
*/
add_filter( 'shield/login_intent_timeout', function () {
return 10; // minutes. default: 5.
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment