Skip to content

Conversation

@rapterjet2004
Copy link
Contributor

@rapterjet2004 rapterjet2004 commented Jan 14, 2026

resolve #5657

Tested on these credentials from Tobias. Note: no talk app is available on this server

https://qr.ltd3.nextcloud.com/
Account ready to be handed out:
Username: user1
Password:

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@rapterjet2004 rapterjet2004 self-assigned this Jan 14, 2026
@rapterjet2004 rapterjet2004 added 2. developing Work in progress 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 14, 2026
@mahibi
Copy link
Collaborator

mahibi commented Jan 16, 2026

just for the record to lookup for later. The URL for onetime-login is this format:

nc://onetime-login/user:YOURUSERNAME&password:YOURAPPPASSWORD&server:YOURSERVERURL

@mahibi
Copy link
Collaborator

mahibi commented Jan 16, 2026

Testing with Sermo i have the following issue:

  1. Login with onetime QR (works)
  2. remove account in app
  3. Login with new onetime QR for same account

Bug:
"Something went wrong" snackbar is shown. Log is:


2026-01-16 10:02:28.650 11291-11470 okhttp.OkHttpClient     com.nextcloud.talk2                  I  {"ocs":{"meta":{"status":"failure","statuscode":403,"message":"could not get one-time app password"},"data":[]}}
2026-01-16 10:02:28.650 11291-11470 okhttp.OkHttpClient     com.nextcloud.talk2                  I  <-- END HTTP (112-byte body)
2026-01-16 10:02:28.650 11291-11470 NetworkLoginDataSource  com.nextcloud.talk2                  E  Error caught at oneTimePasswordRequest: java.io.IOException: Unexpected code Response{protocol=h2, code=403, message=, url=https://.....yourserverurl......com/ocs/v2.php/core/getapppassword-onetime}

It sounds like a server issue so i will merge the PR. Please keep up with the issue until it's clarified and confirmed that nothing has to be changed on mobile side.

@nickvergessen thinks it's a bug on android talk app:

might be that the used session is not a one_time_token
As this also happens without the onetime stuff.. maybe old credentials are still used somewhere

Could you look into this @rapterjet2004 ?

Maybe it's something similar to

Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
@mahibi mahibi force-pushed the issue-5657-one-time-qr-code branch from 740c65d to fbf56d6 Compare January 16, 2026 09:40
…instantiating a new client for each request

Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
@rapterjet2004
Copy link
Contributor Author

rapterjet2004 commented Jan 16, 2026

@mahibi Error should be fixed now. It seemed to be an issue with the okHttpClient saving internal state between requests. This fix instantiates a new client for each request, which is also what is done in the files app.

@github-actions
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/5700.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings99102
Errors00

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1010
Dodgy code5454
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total8181

Lint increased!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One time QR code login

3 participants