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
Can't enable TOTP #177
Comments
Hi @StrangeMonkey, please provide more information about your setup and steps to reproduce this.
Thanks |
I only have this logs on nextcloud :
Thanks for your answer. |
Based on this vague information, I'm assuming you've installed the latest stable version 1.3.0. I manually checked it and the archive contains the file that apparently is missing on your setup. Even though you stated to have installed the app via the app store, this looks like you downloaded the source zip from GitHub. That would explain why the php denpendencies directory (vendor) is missing. |
The circle is turning indefinitely but i have the QrCode :
Thanks for your precedent answer |
Again, to be able to help you with your problem you have to provide more information about what steps you took so far and what errors messages are shown where if you do what. |
Ok.
And don't have any log in my administration pannel. StrangeMonkey |
Thanks for providing more details for this issues! |
Can i help for something to debug ? |
Yes, I think it would help to check I'd also be interested in the HTTP status returned by the server. You can find that by opening the developer console, switch to the network tab and retry to enter a verification code. That should trigger a request to the server. |
Similar/same problem here. Debian 8.0 server, all updates; Nextcloud 12.0.0, TOTP app 1.3.0. No errors at all in any of the logs. QR code appears, but 'enabling circle' keeps turning. After reload of page, checkbox is unchecked; TOTP not enabled. Not sure if this what you asked StrangeMonkey, but opening a Web developer console in FF, this is the response header when entering a code (while the activation wheel is still spinning): Cache-Control: no-cache, no-store, must-revalidate Validation fails. |
Like StrangeMonkey I'm willing to do more logging/debugging. Funny thing is, I got it working on another server (same OS/NC/App) without any problems. Forgot to mention; server (both) are behind reverse proxy. |
I wasn't telling the truth about the servers being identical; background process in my head told me while walking the dog :) They are now; I upgraded the server with the issue PHP 5.6 to 7.0.20 now; didn't solve the problem though. Just for completeness. |
Could anyone of you please provide that information? That would help a lot. |
Ok, good news! Fixed it. Going through the code and thinking about what may go wrong and what the system requirements are, I suddenly knew it would have to be my system clock being slightly wrong. Installed ntp, and voila... Stupid me;should have considered that first thing. Hope this works for StrangeMonkey too. |
Great to hear it was that simple to fix once you know where the problem comes from 😉 |
I encountered the same problem as @StrangeMonkey
Nextcloud log
|
Try adding |
This sadly didn't fix the problem |
I've began to encounter the same problem as soon as I disabled some default apps that come pre-activated with the nextcloud tarball. Before that, TOTP was working without any issue. Maybe there's some kind of app-dependence? |
It would help a lot to know which specific apps you've disabled. |
The disabled apps are: Activity, Collaborative Tags, Comments, Federation. Re-enabling them doesn't make it work either. |
Small update: I noticed that while on my laptop (Windows 10 + Firefox 58) login is remembered even without TOTP, on my phone (Android MIUI 9 + Firefox 58) it is not possible to get a persistent login. If I tap on "Stay logged in" it just reloads the login page. It wasn't happening before the TOTP issue (which in turn happened after enabling/disabling the aforementioned apps). EDIT: I also managed to get the log, but it doesn't say a single thing about TOTP. What can I do more to help? |
Hi, I just installed Nextcloud 13.0.1 and am having this same issue with a fresh install. I have checked my time (and enabled ntp), but the problem remains. When I click on "Enable TOTP," a QR code appears and a spinning icon displays next to "Enable TOTP." I can scan the QR code using Google Authenticator, but when I try to enter a code into the next field it says "Could not verify your key. Please try again." Does anyone have any update on this issue? Hanzei? StrangeMonkey? ChristophWurst, I'm happy to run any tests you can think of. |
I just installed Nextcloud (v13.0.1) from the tarball in a new Ubuntu VM, installed the Two Factor TOTP Provider (v1.4.1) and am still having the same issues I described above. If there's anything I can do to help troubleshoot, I'd be glad to do it. |
Same thing here :( I've tried all OTP Android clients that are available. None of them do. |
ah, I have only LDAP-Accounts, the one you just got, Christoph is a local/internal one. |
I'm getting nothing in the console and only 200 status codes in the network tab as well. I just tested this with Edge and Chrome in Windows 10, but I have the same issue I have with Safari, Chrome and Firefox on the Mac side. Christoph, I'm really at a loss as to how you enabled this for the account I setup for you. Did you leave 2FA enabled? I only ask because I tried to login as you to reproduce and I could get in without 2FA. I have LDAP setup as well, but the account I created for Christoph was a local admin account. Finally, I tried scanning the QR code using FreeOTP. Like Google Authenticator, it scans and provides me with codes, but the spinning circle (that was previously the "Enable TOTP" checkbox) never goes away, and if I refresh the page, it goes back to the unchecked "Enable TOTP" checkbox. |
I disabled it 😉 |
@ChristophWurst you also have a test account on my instance if necessary. Check your mail. |
So on @zoide's account I can see that the web interface sends a request with |
@Maikewng FYI the credentials you've sent are invalid. I cannot log into your instance. |
FTR, these are the states: twofactor_totp/lib/Service/ITotp.php Lines 31 to 33 in 920fa2a
Hence the requests/responses are OK. We just have to find out why the submitted code is considered wrong by the OTP library. |
My bad, I fixed it now. |
Hooray, was able to set up TOTP on @Maikewng's account as well, so yours and @powerbridge's instances work for me, while @zoide's doesn't. This is weird. |
How did you accomplish it @ChristophWurst? Now I managed to set it up on my account as well, is it normal that the checkbox keeps circling until I verify the QRcode with the app? |
Just to be sure we're not working with wrongly set up instances here: are these three instances based on the official tarball/zip and was the app installed via the app settings on the web interface? |
Yes, because without confirmation, the app won't ask for the TOTP on login as otherwise an interrupted setup process would lock you out of your account. Therefore the three states: disabled, created and enabled. |
Yes, indeed. I used the official tarball/zip and installed the app via the web interface. |
I confirm I used the official 13 tarball and installed all the apps through the integrated app store. |
I got it working, thanks Christoph and Maikewng. I had the same problem as Maikewng. I had to enable TOTP, scan the QR code, enter a test code and, after my second attempt at this, 2FA is now working. Thanks everyone! |
Thanks for confirming, @Maikewng, @powerbridge. So what's left is @zoide's instance. That's the one where I can definitely reproduce the bug. Please fill out this issue template so that I can get a better understanding of how you set up your Nextcloud. |
Just want one thing to be clear. I don't know what Christoph did, but previously while trying to enable the TOTP authentication by scanning the QR code and inserting the generated number was leading just to an error and the inability to enable it. |
Karma 😜 |
Hi there, I've also got this issue. I've updated last night to Version: 12.0.5 - production. I've created a short video to show the installation process (from the "app store"), enabling the app, and entering 2 codes - both of which can't be "verified". The video can be seen here: https://nuboso.ei8fdb.org/owncloud/index.php/s/96Sc7NdoOJmkPib The share will expire in 24 hours. @ChristophWurst Do you need any more information to help with this? I'm using andOTP app on Android, if that helps. |
@ChristophWurst I'm behind on my Nextcloud version as I prefer to be a version behind. Regarding the totp app, I downloaded it from the appstore. I guess it's behind as I'm on Nextcloud 12, not 13? The file integrity check warning is:
I'll fix that seperately. Is there anything else I can provide you? Have you got any ideas on where the issue is? |
Please fill out this issue template so that I can get a better understanding of how you set up your Nextcloud. I'm running out of ideas. |
Steps to reproduce
Expected behaviourThe TOTP should be enabled Actual behaviour"Coud not verify your key. Please try again" - message from system Server configurationOperating system: Distributor ID: Debian Web server: Database: PHP version: Nextcloud version: (see Nextcloud admin page) Updated from an older Nextcloud/ownCloud or fresh install: Where did you install Nextcloud from: Signing status: Signing status
List of activated apps: App list
Nextcloud configuration: Config report
Are you using external storage, if yes which one: local/smb/sftp/... Are you using encryption: yes/no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... LDAP configuration (delete this part if not used)LDAP config
Client configurationBrowser: LogsWeb server error logWeb server error log
Nextcloud log (data/nextcloud.log)Nextcloud log
Browser logBrowser log
|
@zoide thanks for the system details. Those look good as far as I can tell. Your server and phone clocks are in sync, right? I've never tested it but I think time drifts during the setup cause errors too (people usually notice them when logging in). |
@ChristophWurst Well, that solved it. Interestingly enough, the clock on my phone was about 1 or 2 seconds behind.... |
Awesome! Great to hear we could resolve these issues for everyone. |
I have the same issue, that the TOTP checkbox is circling forever and state is not save. independently from the QR code scan... |
@oggi4711 please file a new ticket and fill out the issue template. Thanks. |
Hi,
My issue is the following : i can't enbale TOTP, the circle is turning indefinitely.
I think this problem is responsible for the non-use of TOTP.
Thanks for helping.
StrangeMonkey
The text was updated successfully, but these errors were encountered: