Duo Universal 2FA (original) (raw)
Viewing 5 replies - 1 through 5 (of 5 total)
- If the new plugin doesn’t work then I suspect Duo has reused the same code but renamed its functions or moved it into a namespace.
If you can ask Duo to take a look at https://github.com/johnbillion/user-switching-duo-security/blob/master/user-switching-duo-security.php and see what needs updating? Thanks.
Hi,
I found the solution. If you’d like, I can open a pull request on your Github repository, or you can just incorporate this code if you’d prefer:
/* Actions to allow the plugin to be used with Duo Universal. */
add_action( 'switch_to_user', 'user_switching_duo_set_authentication', 1 );
add_action( 'switch_back_user', 'user_switching_duo_set_authentication', 1 );
/**
* Sets the 'duo_auth_status' user meta on the user we're switching to.
*
* Duo Universal, which supplant the duo-wordpress plugin, uses a user meta of
* 'duo_auth_status' = 'authenticated' to determine if a user has been authenticated
* by Duo MFA. This sets that meta on the user we're switching to (or switching back
* to.)
*
* @param int $user_id The user ID we're switching (back) to.
*/
function user_switching_duo_set_authentication( $user_id ) {
update_user_meta( $user_id, 'duo_auth_status', 'authenticated' );
} I am not sure this is exactly related, but I panicked at the messages from Duo about the end of support, and hastily installed and enabled Duo Universal. I did NOT disable the other Duo plugin, and did not disable 2FA.
Now I can’t login with any admin account. I have tried disabling one or the other Duo function through a Duo account, but I get error messages. With both Duo versions enabled, I am stuck in a login loop. With one enabled, I get the error message “Account disabled. Your Duo account is disabled and cannot access this application. Please contact your IT help desk.”
Is there ANY way for me to get back into my WordPress admin account at this point?
–Sarah
@sarah00p You might need to speak with Duo about that issue. They should have guidance about upgrading. It doesn’t sound related to the User Switching plugin.
Viewing 5 replies - 1 through 5 (of 5 total)