Skip to content

Conversation

mszpro
Copy link
Contributor

@mszpro mszpro commented Apr 9, 2024

After running tootctl accounts modify --disable-2fa on an account with webauthn devices set, 2 factor is still required for webauthn.

The above command only sets user.otp_required_for_login to false but does not clear the user.webauthn_credentials. And if the webauthn_credentials is not empty (if the user has setup webauthn), then 2fa is still required during login.

This commit tries to fix this issue by also emptying the webauthn devices when running the above admin cli command.

Related to issue: #27502

@mszpro
Copy link
Contributor Author

mszpro commented Apr 10, 2024

New commit submitted which uses the User#disable_two_factor! method

@mjankowski mjankowski requested a review from a team May 24, 2024 15:35
Copy link
Contributor

@mjankowski mjankowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to have addressed the feedback ... might be mergable?

Could see adding some coverage here to verify things are disabled with this flag (already have some for prior usage, would just need to add other changes)

@ClearlyClaire ClearlyClaire added this pull request to the merge queue Nov 22, 2024
Merged via the queue into mastodon:main with commit 35683ac Nov 22, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants