-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft.AspNetCore.Identity UserManager - Delete user AuthenticatorKey and RecoveryCodes #43562
Comments
What is your use case for this? You can disable MFA and it'll all get ignored anyway. What does deletion accomplish for you that disabling doesn't? |
Hi @Ogglas. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@blowdart If a user chooses to disable two-factor authentication I think there should be an alternative to also delete Two-factor authentication keys. Current functionality: Proposed extra button if a user has keys but not 2FA enabled: A user can of course use Reset authenticator app but that only resets the authenticator key. The database will still keep track of |
Fair enough. We'll think about it for 8. (But there are a lot of edge case scenarios where usermanager doesn't do it) |
I would also like to see this feature. I currently am working within a system which has the concept of OTP disenrollment. In this case, I would like to also clear any related authentication tokens for that user. This way if OTP is re-enrolled, I do not need to worry about old keys floating around within the system or old authenticators still working. To mitigate this today, upon OTP disenrollment I reset the authenticator key which feels wrong, as it simply replaces the key in the database instead of removing it entirely. |
We offer MFA via both email and authenticator app. Many of our users are k-12 students who may or may not have a secondary device during class with which to authenticate. But they will, of course have their primary device. There may be another way to handle this scenario, but I'd like to allow them to be able to remove their AuthenticatorKeys and RecoveryCodes when they mistakenly set up an authenticator app. Removing those would cause their accounts to revert back to what we have as the default MFA method, email. |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I miss a method for deleting
AuthenticatorKey
andRecoveryCodes
for a user inMicrosoft.AspNetCore.Identity UserManager
. I can control nearly everything else but for some reason there is no method to remove these values.Describe the solution you'd like
I would like the following methods implemented:
I know it might be a risk and that the authenticator app will not work until you reconfigure the AuthenticatorKey again etc. However calling
ResetAuthenticatorKeyAsync
without callingSetTwoFactorEnabledAsync(user, false);
or similar will have the same affect imo.Additional context
No response
The text was updated successfully, but these errors were encountered: