Cannot continue setup when admin-users are enforced on login
-
Users are unable to complete their first 2FA configuration. They cannot continue after landing on the first ‘Choose method’ page.
Reproduction steps:
– Configure plugin to enforce users to setup 2FA on their next login (no grace period)
– Create a new user.
– Login as the new user and try to configure 2FA.This issue occurs when 2FA is enforced to be setup upon the next login.
The pageuser_choose_2fa_methoddoesn’t show anything else but the amount of options available, because there is no database entry forwp_2fa_enabled_methodsfor the current user.
If I’m not mistaken, this page should be skipped altogether when an user sets up 2FA for the first time.In my current setup, I’ve added an extra condition upon which the pages ‘user_choose_2fa_method’ and ‘reconfigure_method’ are disabled/skipped in the setup wizard, which is when the aforementioned database entry is empty
( empty( get_user_meta( $user->ID, 'wp_2fa_enabled_methods', true ) )[SetupWizard.php:150]).
This does seem to resolve the issueThe page I need help with: [log in to see the link]
The topic ‘Cannot continue setup when admin-users are enforced on login’ is closed to new replies.