• Resolved Neil Batchelor

    (@nbatchelor)


    The user account will be tied to their business email address and I would like to have the authentication code sent there, then if the user leaves the company and loses access to their business email they will no longer be able to login.

    Is there a way to disable all providers but the email authentication?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try dropping this code into your functions.php in your child theme folder. It removes all providers except email.

    // Redefine 2FA to be only email
    add_filter( ‘two_factor_providers’, ‘your_prefix_two_factor_providers’ );
    function your_prefix_two_factor_providers( $content ) {
    $content = array(‘Two_Factor_Email’ => TWO_FACTOR_DIR . ‘providers/class-two-factor-email.php’,);
    return $content;
    }

    Thread Starter Neil Batchelor

    (@nbatchelor)

    @johnstaples That’s awesome, and exactly what I wanted to achieve. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable all but email auth’ is closed to new replies.