-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suport 2FA-Plugin #76
Comments
Thank you @ouun for the heads up. I will take a look at this soon. Two-factor auth is very important, and supporting it directly & natively in this plugin makes sense. 👍 |
Hi @JJJ, Thanks and kind regards, Philipp |
@ouun this year, yes! I do hope to give this plugin some attention in the coming weeks. 💟 |
I gave this combination a try today, knowing about this particular issue. During my investigation I found some obsolete usage of I wasn't able to find any not working stuff at all. Even my console doesn't showed any errors, when updating one of the 2FA options or when I used the Generate Verification Codes Button. Could you please describe what you expected @ouun and what happened and where? ;) |
Ok, one thing, but it's not related to JS: The 2FA Plugin gernerates an In combination with |
Hi @carstingaxion, I guess the JS issue I mentioned is that the "Register New Key"-Button for FIDO-Keys does not work when WP User Profiles is active. The other improvement suggestion was to extract 2FA-Settings from the "Others"-Tab. Maybe "Acount" or a "Security"-Tab would be a more intuitive position. Thanks and kind rergards, Philipp |
Ola @ouun, thank you for taking the time.
You're right. I'll have a look into it.
Exactly what I had in mind, too. But didn't wrote it down. |
Fiddling with
I was able to bring back the required javascripts from the Two Factor Plugin, by just enqueing them. // Better compatibility for two-factor
//
// Part1 : Bring back .js
add_action( 'admin_enqueue_scripts', function ( string $hook ) {
if ('users_page_other' !== $hook )
return;
if ( ! class_exists('Two_Factor_FIDO_U2F_Admin')) {
require_once TWO_FACTOR_DIR . 'providers/class-two-factor-fido-u2f-admin.php';
}
// this is missing, due to 'wp-user-profiles' different $hook global
// luckily, we can just call it
Two_Factor_FIDO_U2F_Admin::enqueue_assets( 'profile.php' );
},
// two-factor registers on 5 and enqueues at 10
0 ); For development puposes just loaded from a But now, comes Part 2: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('chrome-extension://...') does not match the recipient window's origin ('null') And this one I get even without
Right now we have 55% of the 0.8.0 milestone. |
Going on with Part 3 : Move 2FA into account tab remove_action( 'show_user_profile', array( 'Two_Factor_Core', 'user_two_factor_options' ) );
remove_action( 'edit_user_profile', array( 'Two_Factor_Core', 'user_two_factor_options' ) );
// fast & dirty, without own metabox
add_action( 'wp_user_profiles_password_metabox_after', array( 'Two_Factor_Core', 'user_two_factor_options' ) ); Works. |
Ola @JJJ . Where would be the best place to hold such compatibility code? I would like open a PR with a cleaned and polished implementation. |
This is looking awesome so far! @carstingaxion I think, use your best judgement! 😅 Since Two-Factor is a core WordPress initiative, treat it as if it were already merged and ready? We can conditionally hook/unhook it based on any criteria later (versions, activations, etc...) |
@JJJ this is a very useful plugin, thanks a lot!
I would like to suggest that it supports the 2FA-Plugin (https://wordpress.org/plugins/two-factor/) by default.
Currently the settings land in the "Others" tab and it does not work as expected due JS issues.
Kind regards,
Philipp
The text was updated successfully, but these errors were encountered: