Skip to content

fix(auth): send the device identity when signing in - #670

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/1219-auth-device-headers
Oct 7, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/1219-auth-device-headers

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-server#1219
Validation tasks: unblocks #334 C2, #335 C2

The Apple apps don't send their device identity when they sign in. The X-Silo-Device-* and client headers are skipped on public auth requests: password login, OAuth completion, network sign-in, device-code start and poll, and token refresh. The server can't record which device a login session belongs to, and sessions show as Silo/1 CFNetwork/…. #1219 AC1 requires each login to be recorded with its device.

Sign-in requests now carry the device identity.

Approach

  • Which requests: the auth header functions attach the device and client identity to public auth requests, and so does the refresh request.
  • What stays off: these requests still carry no Authorization or profile headers.
  • Where they go: they are only built for the Silo server, never for an identity provider.
  • Server side: fix(auth): record the signing-in device on login sessions silo-server#2042 records these headers on login sessions.

Validation

  • Tests check that every sign-in path and refresh sends the identity headers without Authorization or profile headers. Auth and networking tests pass; iOS and tvOS builds succeed.
  • Tested by hand against a local server: login sessions from iPhone, iPad and Apple TV simulators recorded each device's id, name and platform (iOS, tvOS).

Evidence

Evidence: https://evidence.siloserver.org/r/silo-apple/pr-670/

Risks

None identified.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code with subagents, GitHub CLI, Playwright, Xcode iOS and tvOS simulators, Android Emulator
  • Model(s): claude-opus-5-5[1m]
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: A separate review agent read the diff against main and found no issues, including no identity headers sent to identity providers. Confirmed on simulators against a local server.

HTTPClient returned early for public auth paths before attaching any
headers, so password login, OAuth completion, network sign-in and the
device-code start, capability and poll requests went out without the
X-Silo-Device-* and X-Silo-Client-* headers. The server records those on
the login session a sign-in opens; without them the session had no device
id or platform and was named after the CFNetwork user agent. Token refresh
built its request separately and had the same gap.

Public auth requests now carry the device and client identity and still
carry no Authorization or profile headers. The refresh request carries
the identity too. Both only go to the Silo server.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c0b38f56-fd7c-4aa7-bd4e-81a57280b61a
📥 Commits

Reviewing files that changed from the base of the PR and between d96c81c and 514bea8.

📒 Files selected for processing (2)
  • iosApp/Tests/AuthDeviceV2Tests.swift
  • iosApp/iosApp/Networking/HTTPClient.swift
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Quick104 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Evidence: FAIL

The Evidence section is still a placeholder ("publishing to the evidence site; the link follows"), so there's nothing to check yet.

This change is visible to users: login sessions should now show the real device name and platform instead of Silo/1 CFNetwork/…. To pass, Evidence should show the sessions list before and after for every Apple platform that ships this HTTPClient code:

  • iOS (iPhone/iPad) and tvOS: the Validation section says you tested these by hand, so a before/after capture of the session list for each would cover them.
  • macOS: if the macOS app uses this same networking code, it needs a capture too. If it doesn't, please say so in Evidence.

Once the link is up with those captures, this should be fine.

Grok commenting on Quick's behalf.

@Quick104 Quick104 added priority: P2 Limited scope, workaround exists, or polish impact: security Auth, privacy, or permission boundary labels Oct 7, 2026 — with Cursor

Quick104 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Note

Grok commenting on Quick's behalf.

Evidence check: FAIL. The Evidence section is a placeholder ("publishing to the evidence site; the link follows"), so there's nothing to review yet.

This changes what gets recorded and shown for Apple login sessions (device id, name and platform instead of Silo/1 CFNetwork/…), so it needs real Evidence for both surfaces the PR covers:

  • iOS: before/after for the same password sign-in and token refresh. Either the login-session/devices view showing the device, or fenced before/after request headers (curl or JSON) for POST /api/v2/auth/login and POST /api/v2/auth/refresh. Note the build/commit.
  • tvOS: the same for the device-code sign-in (start and poll), with the build/commit noted.

A shelf link works too: Evidence: https://evidence.siloserver.org/r/silo-apple/<topic>/.

Also, the server companion is listed as Silo-Server/silo-server#S2PR. Please link the real PR number so both halves of the stack can be checked.

Quick104 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Note

Grok commenting on Quick's behalf.

Ranking: priority: P2 · impact: security. Sign-in now carries device identity so login sessions are attributed to a real device (#1219 AC1); sign-in itself already works, so it's scoped session metadata rather than a broken flow. Lands alongside the server-side change.

@Quick104
Quick104 merged commit 4af0d87 into Silo-Server:main Oct 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact: security Auth, privacy, or permission boundary priority: P2 Limited scope, workaround exists, or polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants