Skip to content

M0: single sign-on with the Files app - #8

Merged
tobiasKaminsky merged 3 commits into
mainfrom
m0/sso
Dec 3, 2026
Merged

tobiasKaminsky merged 3 commits into
mainfrom
m0/sso

Conversation

@tobiasKaminsky

Copy link
Copy Markdown
Member

Stacked on #7: review only the last commit until the earlier PRs are merged.

SPEC §5.1. Accounts of the Nextcloud Files app via Android-SingleSignOn:

  • SsoInterceptor turns android-library's OkHttp requests into SSO requests, so NextcloudClient (and later Coil and Media3) work the same for SSO and own accounts. Multistatus methods answer 207, HTTP errors keep their status, COPY/MOVE pass Destination/Overwrite as SSO parameters
  • Login shows Use an account from the Nextcloud Files app when Files is installed
  • Signing in checks that Files forwards SEARCH (nextcloud/android#18196 adds SEARCH, PROPPATCH, REPORT, COPY); older Files apps get Update the Files app
  • Enables core library desugaring (required by Android-SingleSignOn)

Tests: SsoInterceptorTest (path, headers, query, body, 207, COPY destination, HTTP errors, old Files app). Not yet tried with a real Files app.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z

tobiasKaminsky and others added 3 commits December 3, 2026 10:26
As iOS §5.3 (SPEC §5.2): capabilities, then the Photos settings (companion
config API, else the web app's initial state, else defaults), then probes
for Photos DAV, places, Recognize, system tags, timeline days, unified search
and task processing, run in parallel through android-library's client.

Stored per account as JSON (ServerFeatures in core/model), detected at login
and at app start or account switch when older than an hour; failures keep
the previous result. The server theme colour now colours the app.

Tests: parsers against the photos-apple fixtures (stock master, Photos 8,
extended), repository refresh rules, and detection against Docker Nextcloud 33.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
When the server rejects an account's login (401), the app checks for a
remote wipe (as iOS §5.1, SPEC §4.3). If one was requested, the account is
purged (AccountCleanup hooks, now incl. the per-account files and cache
folders, its Keystore key and DB row) and the wipe is confirmed to the
server; the user sees a notice. Otherwise the home screen offers "Log in
again" and "Remove account".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
Accounts of the Nextcloud Files app can be used through Android-SingleSignOn
(SPEC §5.1). SsoInterceptor turns android-library's OkHttp requests into SSO
requests, so NextcloudClient (and later Coil and Media3) work the same for
SSO and own accounts. Multistatus methods answer 207, HTTP errors keep their
status, and an "unsupported method" from an old Files app becomes
FILES_APP_TOO_OLD.

The login screen offers "Use an account from the Nextcloud Files app" when
Files is installed. Signing in checks that the Files app forwards SEARCH
(nextcloud/android#18196); otherwise it asks to update the Files app.

Enables core library desugaring (required by Android-SingleSignOn).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb4eMg7ShMcjycNqaRBq3z
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
@tobiasKaminsky
tobiasKaminsky merged commit 757678f into main Dec 3, 2026
6 checks passed
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 49d7d6c
Version 8
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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant