Title: Duo Universal 2FA
Last modified: September 8, 2025

---

# Duo Universal 2FA

 *  [Patrick Johanneson](https://wordpress.org/support/users/pjohanneson/)
 * (@pjohanneson)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/duo-universal-2fa/)
 * I know there’s an add-on plugin for dealing with Duo’s WordPress 2FA plugin. 
   However, Duo has moved on to a new plugin, Duo Universal, and it doesn’t play
   well with User Switching either. Is there anything in development to deal with
   Duo Universal, or should I be trying to develop my own solution?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [7 months, 1 week ago](https://wordpress.org/support/topic/duo-universal-2fa/#post-18633200)
 * 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](https://github.com/johnbillion/user-switching-duo-security/blob/master/user-switching-duo-security.php)
   and see what needs updating? Thanks.
 *  Thread Starter [Patrick Johanneson](https://wordpress.org/support/users/pjohanneson/)
 * (@pjohanneson)
 * [7 months ago](https://wordpress.org/support/topic/duo-universal-2fa/#post-18646002)
 * 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:
 *     ```wp-block-code
       /* 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' );}
       ```
   
 *  [sarah00p](https://wordpress.org/support/users/sarah00p/)
 * (@sarah00p)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/duo-universal-2fa/#post-18808568)
 * 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
 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/duo-universal-2fa/#post-18808572)
 * [@sarah00p](https://wordpress.org/support/users/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.
 *  [sarah00p](https://wordpress.org/support/users/sarah00p/)
 * (@sarah00p)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/duo-universal-2fa/#post-18808595)
 * Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fduo-universal-2fa%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/user-switching/assets/icon.svg?rev=3193956)
 * [User Switching](https://wordpress.org/plugins/user-switching/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-switching/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-switching/)
 * [Active Topics](https://wordpress.org/support/plugin/user-switching/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-switching/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-switching/reviews/)

## Tags

 * [2fa](https://wordpress.org/support/topic-tag/2fa/)
 * [admin login](https://wordpress.org/support/topic-tag/admin-login/)
 * [duo](https://wordpress.org/support/topic-tag/duo/)

 * 5 replies
 * 3 participants
 * Last reply from: [sarah00p](https://wordpress.org/support/users/sarah00p/)
 * Last activity: [2 months, 2 weeks ago](https://wordpress.org/support/topic/duo-universal-2fa/#post-18808595)
 * Status: not resolved