Skip to content

Commit

Permalink
Fix totp with force 2fa
Browse files Browse the repository at this point in the history
  • Loading branch information
joehoyle committed Aug 4, 2023
1 parent 98a3165 commit 1adfe47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions class.two-factor-force.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ public static function force_2fa_login_html() {
wp_enqueue_style( 'list-tables' );
}

if ( isset( $providers[ 'Two_Factor_Totp' ] ) ) {
$providers[ 'Two_Factor_Totp' ]->enqueue_assets( 'profile.php' );
}

if ( ! function_exists( 'login_header' ) ) {
// We really should migrate login_header() out of `wp-login.php` so it can be called from an includes file.
include_once( TWO_FACTOR_DIR . 'includes/function.login-header.php' );
Expand Down
2 changes: 1 addition & 1 deletion providers/class-two-factor-totp.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function __construct() {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) );
add_action( 'two_factor_user_options_' . __CLASS__, array( $this, 'user_two_factor_options' ) );
add_action( 'two_factor_ajax_options_update', array( $this, 'user_two_factor_options_update' ) );
add_action( 'two_factor_ajax_options_update', array( $this, 'user_two_factor_options' ) );

return parent::__construct();
}
Expand Down

0 comments on commit 1adfe47

Please sign in to comment.