[Solved] 2FA: Missing "Admin code provider"

Nextcloud version : 15.0.5
Operating system and version: Linux QNAP NAS - Docker: linuxserver/nextcloud:171
Apache or nginx version: Apache 2.4.25

Hi, I have the following problem with two of my Nextcloud instances (different provider)
2FA: Admin code provider
does not exists.

Reproduce:
I created an account named “test” and activated 2FA, backup keys and TOTP for it.
Everything worked fine.

Now I am not able to login, after I lost the remaining backup keys and deactivated TOTP via occ.
I can generate an one time password, but it is not accepted as backup password and I am not able to use another option as 2FA password.

root@7b01b2c0ee34:/$ sudo -u abc php /config/www/nextcloud/occ twofactorauth:admin:generate-code test                                                                                                                                                                           
There is an existing code that will be overwritten.                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                
Generated new one-time code for test: 575257                                                                                                                                                                                                                                    
This code is valid for 48 hours.                                                                                                                                                                                                                                                
root@7b01b2c0ee34:/$ sudo -u abc php /config/www/nextcloud/occ twofactorauth:state test                                                                                                                                                                                         
Two-factor authentication is enabled for user test                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                
Enabled providers:                                                                                                                                                                                                                                                              
- admin                                                                                                                                                                                                                                                                         
- backup_codes                                                                                                                                                                                                                                                                  
Disabled providers:                                                                                                                                                                                                                                                             
- gateway_signal                                                                                                                                                                                                                                                                
- gateway_sms                                                                                                                                                                                                                                                                   
- gateway_telegram                                                                                                                                                                                                                                                              
- totp                                                                                                                                                                                                                                                                          
- twofactor_nextcloud_notification                                                                                                                                                                                                                                              
- u2f                                                                                                                                                                                                                                                                           
- yubiotp 

According to your documentation, there should be an “Admin code provider” in the 2FA selection:
https://nextcloud-twofactor-admin.readthedocs.io/en/latest/User%20Documentation/

Do not worry about my data, this is a test account.
How can I login again?

Solved by deactivating and activating the app " Two-Factor Admin Support"

Have you tried to turn it off and on again :wink: