How To Force Two-Step Authentication In Jetpack SSO

Last week I shared how to enable two-step authentication in your WordPress using Jetpack’s Single Sign On module. However, there is one problem in Jetpack’s SSO module. Even after you enable two-step authentication, a visitor can easily sign-in with the login form, and he won’t have to complete two-step authentication process.

Here’s way which will force two-step authentication in Jetpack SSO module by directly redirecting all our users to connect login form.

Just drop the following snippet to your current theme’s functions.php file:

add_filter( 'jetpack_sso_bypass_login_forward_wpcom', '__return_true' );

Thanks to Ben Lobaugh for the help!

2 thoughts on “How To Force Two-Step Authentication In Jetpack SSO”

  1. Hi Hardeep, wow it is amazing how much knowledge you seem to have on WordPress coding.

    I have an issue which doesn’t fit completly but seem to be close to what you did here. Maybe you could help me out with it?

    I did setup a website and blocked the content of it with a membership plugin. But some of my content is still to be seen in the web because I included it directly into the design. Now I want to have an automatic redirect to my custom login page URL if someone who is NOT logged-in enters one of these pages. Since there is nothing else on this installation it could redirect all but the login-page itsself to this one URL. ( BUt it should be automatic)

    It would be nice if you could help me out with this one.
    Btw I bookmarked your website. See you later. ;)


Leave a Reply

Your email address will not be published. Required fields are marked *