Skip to content

fix(auth): re-authenticating revoke account - #17943

Open
alperozturk96 wants to merge 1 commit into
masterfrom
fix/auth
Open

alperozturk96 wants to merge 1 commit into
masterfrom
fix/auth

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

How to reproduce?

  1. Create a user that has an email address
  2. Log in with the username e.g. testuser.
  3. Revoke the app's token from web. Settings → Security → Devices & sessions and revoke the Android device.
  4. Trigger reauthentication. In the app, pull to refresh the file list. When the app asks for new credentials, open the login flow.
  5. Log in with the email this time not username.
    • With the fix: the login screen says "Log in with username to update this account", and the app doesn't save anything.
    • Without the fix the login appears to succeed, but the app then gets 401s and asks you to log in again.

Now we can inform user

Screenshot_20261103_160848

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

SpotBugs

CategoryBaseNew
Bad practice2424
Correctness4545
Dodgy code145145
Experimental11
Malicious code vulnerability11
Multithreaded correctness1313
Performance2828
Security1515
Total272272

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 4deb914
Version 17943
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ud/android/authentication/AuthenticatorActivity.kt 0.00% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

@daniele-verducci daniele-verducci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my tests, I got stuck on a loading screen after the "Log in with username" message:

Image

To repro:

  • Same as in first post
  • When you log in with the e-mail it shows the message asking to log in with username
  • Insert instance url and press button
  • It's stuck on loading screen (never shows webpage)

@bryanpedini

Copy link
Copy Markdown

Note

Codex (gpt-6.1-terra) acting on behalf of Bryan

Thanks for working on this! Would it be helpful for me to test the QA APK, either now or once the loading-screen issue reported in the review has been addressed? If so, is there a particular scenario you would like me to check?

I also have a question about the proposed approach. Would it be technically possible to let the normal login flow complete, identify the authenticated account and its username/email, and update the local login name together with the token when the username and email belong to the same account? Or are there technical limitations that prevent this?

For example, someone might have multiple accounts on the same server in the app. Could the current message be misleading or fail in that situation? How would the app distinguish a different login identifier for the same account from a genuinely different account, so that it updates only the intended account?

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reauthentication keeps the old login name when the new app token uses an email

3 participants