# Невозможно отключить 2FA

**URL:** <https://meta.discourse.org/t/cant-disable-2fa/160500>\
**Category:** Bug\
**Created:** [11.Август.2020 16:54:25 UTC](https://meta.discourse.org/t/cant-disable-2fa/160500 "2020-08-11T16:54:25Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)\
**Post date:** [31.Август.2020 19:55:58 UTC](https://meta.discourse.org/t/cant-disable-2fa/160500/8 "2020-08-31T19:55:58Z")

</div>

Это должно быть исправлено сейчас 🙂

> <https://github.com/discourse/discourse/pull/10485>
>
> This will fix the bug reported \[here on Meta\](https://meta.discourse.org/t/cant-…disable-2fa/160500)
> 
> The second factor management page has previously included a "Disable" button. Selecting this button brings up a confirmation:
> 
> \<img width="619" alt="old" src="https://user-images.githubusercontent.com/22733864/90696567-5a087500-e231-11ea-8156-1ce333502d9f.png"\>
> 
> Instead of disabling all registered TOTP Authenticators \*\*and\*\* Security Keys, confirming only disables all TOTP Authenticators.
> 
> \---
> 
> This PR will change the "Disable" button on the second factor management page to say "Disable All," and make a few styling/copy improvements to the confirmation:
> 
> \<img width="618" alt="Screen Shot 2020-08-13 at 6 45 51 PM" src="https://user-images.githubusercontent.com/22733864/90697350-0d259e00-e233-11ea-84cf-48b44d0389dd.png"\>
> 
> \<img width="618" alt="Screen Shot 2020-08-19 at 3 31 25 PM" src="https://user-images.githubusercontent.com/22733864/90697359-13b41580-e233-11ea-98cb-95262ad444e2.png"\>
> 
> 
> It also fixes the behavior so that \*\*all\*\* second factor methods are removed when using the "Disable All" button.
> 
> 
> \*\*Notes\*\*
> 
> \- The test was tricky and takes heavy inspirations from other tests. I imagine there may be a more elegant or complete implementation, but I'm pretty sure I have the most important functionality tested. If I need to make any changes, let me know.
> 
> \- Both second factor methods can be disabled individually instead of using the "Disable All" button using the pencil icon buttons showing in the above screenshot. What I came to realize is that the implementation for individual disabling is quite different than the disable all method. The "Disable All" button deletes the relevant \`user\_second\_factors\` and \`user\_security\_keys\` records from the database, whereas disabling the second factors individually sets \`enabled: false\` in the relevant record and keeps it around. This is not new behavior and nothing is technically broken, I just wanted to bring it up in case we might want to have consistency. If anything needs to change, I imagine it can be addressed in a follow-up commit.

---

_[View the full topic](https://meta.discourse.org/t/cant-disable-2fa/160500)._
