A user is unable to disable 2FA for a specific user via the admin interface, receiving an ‘invalid parameters’ error. The issue arises because the user has a UserSecurityKey record but no UserSecondFactor record, preventing the UI from functioning correctly. Brandon_Martus resolves the issue by removing the UserSecurityKey via the Rails console, which successfully disables 2FA. omarfilip suggests using the console, while jomaxro and Falco highlight that the site is running an outdated and unsupported version of Discourse (2.5.0.beta4), missing critical security fixes, and recommend an immediate upgrade.
(You supplied invalid parameters to the request: Discourse::InvalidParameters)
There is no row in the users_second_factors table for the user_id. I’ve tried adding a dummy row, which lets me click the ‘Disable’ button without error, but just deletes my dummy row and still leaves 2FA enabled for the user.
I’ve also tried the rake users:disable_2fa[username] rake task, which says 2FA disabled for user, but still shows Two Factor Authentication: Yes on the user’s profile in admin.
It’d also be good to know what version of Discourse you are running. There have been fixes for the inability to disable 2FA via the UI since the first release of 2FA.
Seems like there still is an issue where I should be able to do this via the UI, but get the invalid parameters issue, possibly due to the missing UserSecondFactor record?