Android app requires login every time it is opened

Repro Steps:

  1. Download Nextcloud Android app.
  2. Open app.
  3. Enter URL to private Nextcloud server and tap the “->” button.
  4. Tap the “Log in” button.
  5. Enter username and password and tap the “Log in” button.
  6. Enter TOTP and tap the “Submit” button TWICE. The first time appears to do nothing. Weird.
  7. Successful login. See Dashboard page.
  8. Close app.
  9. Open app.
  10. I’m not logged in have to do the whole process over again.
1 Like

Hi @yarsiemanym if you see the dashboard then you are still seeing the web version so the http redirect didn’t happen after a successful login.

This is why you need to relogin because the weblogin flow seems to have an issue. Unfortunately I can’t tell you what to do since I don’t run 2FA or know much about the server config possibilities. But maybe others do.

@yarsiemanym: I have the exact same behavior, also needing to press the TOTP submit button twice before anything happens.

My Nextcloud server is behind a reverse proxy, but I did not have this problem on my old server which was behind the exact same reverse proxy as this new one.

@Andy Are there any logs that I should try to fetch that might help debug this?

Server version: 21.0.1 on TrueNAS, client version: 3.15.1 on Android 11.

@yarsiemanym I am not to familiar with the server-side login-webflow :confused: The client is waiting for a http-redirect so I’d guess this could only be seen on the server. Maybe @rullzer has an idea.

Since I didn’t have any files in my Nextcloud installation yet, I reinstalled it using the instructions found here: How to install Nextcloud on FreeNAS in an iocage jail with hardened security - Samuel Dowling

and made sure to correctly configure the reverse proxy according to his instructions. After doing that the login to the app is working correctly. I only needed to press the TOTP button once and after that the app asked for permission to access my photos which did not happen before.

@yarsiemanym Maybe check your reverse proxy settings and compare them to the settings in the blog linked above to see if that will fix the issue for you. Hopefully that will be enough so that you don’t have to reinstall anything.