[SOLVED] TOTP Second-factor Auth won't activate

Steps to reproduce

  1. Login
  2. Click on Setting menu link
  3. Click on Security
  4. Check Activate TOTP

Expected behaviour

It should display a QR code and 2FA config code with field to confirm setup.

Actual behaviour

Nothing happens. No QR Code or 2FA config code.

Server configuration

Operating system: Centos7.9

Web server: Apache 2.4

Database: MySQL 5.7

PHP version: PHP 7.4
Same result with PHP 7.2 ad 7.3

ownCloud version:

Updated from an older ownCloud or fresh install: Updated from 10.6.0

Where did you install ownCloud from: ownCloud.org

Existing user with TOTP Second-factor Auth activated work fine.

New users cannot activate TOTP Second-factor Auth. Checking the box gives not additional steps to activate.

I look in the oc_twofactor_totp_secrets table do see the two user that tried today have records with secret keys that have not been verified. So it is partially doing something, but not allowing the process to complete by giving the necessary info to the user.

Any suggestions on where to start looking?

I would

  • clean all caches
  • check the browser console
1 Like

I cleared caches and open console in safari.

I see this:

[Log] JQMIGRATE: Migrate is installed, version 1.4.0 (jquery-migrate.min.js, line 2)
[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (enable, line 0)


After checking the error further, I saw that it indicated to check the owncloud.log.

In the owncloud.log, It was saying “You need to install the imagick extension to use this back end”.

Not sure how is uninstalled, It was working at one point.

After installing imagick TOTP works as expected.

1 Like

Hmm, so I assume, the request

POST https://***/index.php/apps/twofactor_totp/settings/enable

failed for some reason. Now I’d check the related part of owncloud.log. Maybe you should increase the logging level.

EDIT: You’re too fast with your solution. :grinning:
Glad to hear it works.

1 Like

I’ll slow down next time to give everyone time to absorb the comments. :grin:

Thank you for your suggestion, it lead me to the right place to continue troubleshooting.

Have a great day!


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.