twofactor_email icon indicating copy to clipboard operation
twofactor_email copied to clipboard

Disabling of twofactor_email does not work :-(

Open MyDJB68 opened this issue 1 year ago • 1 comments

As Nextcloud 29 still is not allowing to install the app, I went back to 28.0.5 and tried to disable 2-factor e-mail via

sudo -u http php82 -d memory_limit=1024M occ twofactorauth:disable 'myuser' email

Buit I get the error message: The provider does not support this operation.

How can I get rid of 2-factor e-mail authentification completely until compatibility to v29 is available?

MyDJB68 avatar May 26 '24 15:05 MyDJB68

The occ console is located in the Nextcloud directory, so you need to change to that directory first before issuing the command to disable the app (change capital letters to fit your needs):

cd /PATH/TO/NEXTCLOUD sudo -u www-data php occ app:disable NAME_OF_APP

If you don‘t know the name of the app, you can list all apps with:

sudo -u www-data php occ app:list

AndyXheli avatar May 30 '24 16:05 AndyXheli

Short update that I hope fits your topic: I did have the same issue, since the beta of 2fa mail worked fine for me until NC30. Updated from 30.0.6 to 31.0.1 and coudl not do anything anymore. Stumbled upon this thread: https://help.nextcloud.com/t/twofactoremail-issue-prevents-login-after-upgrade-to-nextcloud-31-0-0/218857/6 and could disable it directly in the database. So far so good. But...

After I was able to use my NC instance again, I discovered that I now got the following error-message, when trying to login in again after a log out: Could not load at least one of your enabled two-factor auth methods. Please contact your admin

Even though the app was disabled (and removed), the 2fa provide "mail" was still enabled for my users. Since the app was disabled and removed, I could not disable the 2fa mail provider from my security settings.

I could however disable it in the database as well: SELECT * FROM public.oc_twofactor_providers where provider_id = 'email' and uid = '<youraffecteduserid>' ORDER BY provider_id ASC, uid ASC

It showed the mail entry still exists and is enabled- even though the app got disabled and removed. I simply set it to "0" for all relevant users and the above message disappeared.

So when I log in now, after entering username + PW, it does not show the prompt to select the 2fa provider with the error message anymore, but directly displays the totp input dialogue /thumsup

naelfe avatar Mar 15 '25 12:03 naelfe

I am very sorry for all the inconveniences. I just released 2.8.0 to GitHub and apps.nextcloud.com. The easiest way would be to update and then to either keep the app, or to remove it.

nursoda avatar Mar 16 '25 12:03 nursoda