Repository navigation
feat(auth): sign in with network identity on phone and TV - #454
Conversation
When the server lists a network provider (such as the Tailscale plugin)
for this device, phone and TV offer "Continue as <owner>" above the other
ways in. One press posts {} to the listed network_sign_in_path on the
saved server base and saves the returned token pair exactly as a password
sign-in does. The TV button takes initial focus; the device code, QR and
password form stay available. Refusals (network_identity_required,
not_permitted, email_in_use and the shared ones) have readable text that
names the provider.
Phone Settings > Sign-in offers "Connect <provider>" for a listed network
provider when getExternalSignInCapabilities reports network_sign_in,
asking only for the account password (linkAccountIdentityWithNetwork).
Vendors only the network sign-in contract fixtures and the updated
capabilities fixture, and adds them to the sync script's selection.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedYou'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 48 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds network identity sign-in and account linking. Shared code discovers eligible network providers, validates their routes, and sends sign-in and linking requests. Android adds login and settings flows. Android TV adds a network sign-in action alongside its existing sign-in options. ChangesNetwork identity contracts and API
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~60 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant LoginScreen
participant LoginViewModel
participant ExternalSignInRepository
participant ExternalSignInApi
LoginScreen->>LoginViewModel: onNetworkSignIn
LoginViewModel->>ExternalSignInRepository: signInWithNetworkIdentity
ExternalSignInRepository->>ExternalSignInApi: signInWithNetworkIdentity
ExternalSignInApi-->>LoginViewModel: login response or error
LoginViewModel-->>LoginScreen: update login state
Merge Risk: ⚪ Minimal · up to No actionable issue is established for the reviewed head. The change appears mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Network sign-in preserves saved-server routing and guarded token storage. Account linking, however, does not consistently bind its confirmation and completion to the same account session. Server-side behavior after an interrupted link also remains unverified. No remote account-takeover path was established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 28.89% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 225 functions across 20 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e45188d609
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Quick104
left a comment
There was a problem hiding this comment.
Review of the network identity sign-in: three bugs, two UX gaps, five cleanups (inline). Found by reading the code; none were reproduced on a device.
…it in the TV password form A phone approval that cancelled a pending "Continue as" sign-in left the network button busy when saving the approval failed, which also blocked the password form. The device handoff now frees both buttons when it ends. On servers without device sign-in, the TV opens on the password form, which had no "Continue as" button. The form now shows it above the fields and focuses it, including when the providers answer before the device check. The two-line button uses less vertical padding so the form still fits a 960x540dp screen. The TV's email_in_use message for network sign-in no longer points to Settings, which the TV does not have. It points to the phone or web app. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Cancel in the Settings directory and network prompts now stops the link
call still under way, like the browser prompt already did, and reloads the
section so a link the server made first still shows. Before, the link kept
running and could report "Connected" after the prompt was gone.
On the phone, "Continue as" keeps its own busy flag. Reloading the sign-in
options no longer frees the password form and provider buttons while the
request is still out.
On the TV, "Sign in with a password" waits while "Continue as" is signing
in, so the form can't hide the "Signing in…" label. Once "Continue as" is
refused, the device code's recovery action ("Try again", "Show a new code")
takes focus again.
Cleanups: the phone's network refusals in Settings map through
NetworkSignInFailure and share their copy with the sign-in screen; the TV
error text takes one provider name for the attempt; the network sign-in
call trusts the path discovery already validated; and the unused
OAuthHandshakeCapabilities.networkProvider is gone.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 667f56d392
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Cancelling a link prompt reloads the Sign-in section, and so does every link that succeeds. If the cancelled prompt's reload answered after the next link's reload, it showed the identities from before that link. Each reload now takes a generation, and only the newest publishes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…in server commit SOURCE named the earlier OIDC server commit, which doesn't contain the network sign-in fixtures. A full re-sync from the server branch that adds them reproduces every vendored body; the only other change is the system info fixture's contract digest. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ea62000bd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
On a server without device sign-in, the password form shows "Continue as" above the fields. The view model already ignored a password submission while the network sign-in waited, but the fields, the IME Done action and Sign in stayed enabled, so Sign in looked live and did nothing. They now follow one signingIn state (password or network busy) that the view model's guards also use. Focus stays on the waiting "Continue as", and the D-pad steps between it and the secondary actions past the disabled controls. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38cba253ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The phone view model ignores a password submission while any sign-in is under way (signInBusy: password, browser provider start, or Continue as). The Sign in button only followed the network wait, though, and the fields, the show-password toggle and the IME Go action never did, so they looked live and did nothing. All of them now follow signInBusy, as the TV form does. AuroraTextField gains an enabled flag that dims its text when off. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: Silo-Server/silo-server#1828
Validation tasks: none. TV sign-in (#336, #337) hasn't been run yet, and the new button appears only on servers with a network sign-in provider.
A Silo server can now sign in the owner of the requesting device through a network access plugin such as Tailscale (Silo-Server/silo-server#1828). On a server shared over a tailnet, an Android TV signed in to Tailscale could then sign in with one button, with no code to approve and no password to type. The apps don't offer it yet.
Solution
networkprovider for this device, phone and TV offer "Continue as {owner}" above the other ways in. On the TV the button takes initial focus, and on a server without device sign-in it sits above the password form; the device code, QR and password form stay available. One press posts{}to the listednetwork_sign_in_pathon the saved server base and saves the returned token pair exactly as a password sign-in does.network_identity_required,not_permitted,email_in_useand the shared ones) read as sentences that name the provider.network_sign_in. It asks only for the account password (linkAccountIdentityWithNetwork). The TV has no linking screen, as with the other providers.SOURCEnames a commit that reproduces every vendored body.Validation
shared1592,androidApp800,androidTvApp1198. They cover the API calls and contract fixtures, the login view models on phone and TV (button, sign-in, refusals, a device approval that cancels "Continue as", an options reload while it waits), and Settings linking, including Cancel stopping a link under way and a late reload not overwriting a newer one.TvLoginScreenNetworkSignInTest, renders the TV login at 960x540dp. It checks that "Continue as" shows and takes focus in the password form, on a server with only network sign-in, and when the providers answer before the device check.lintDebugforandroid-shared,androidAppandandroidTvApp, pluslintVitalReleasefor both apps) reports nothing new.Risks
networkprovider, and nothing changes.AI Disclosure
🤖 Generated with Claude Code
Note
Add network identity sign-in to phone and TV login flows
ExternalSignInApi.signInWithNetworkIdentityin ExternalSignInApi.ktAuthRepository.signInWithExternalSignInApi.linkWithNetwork, reusing a shared prompt/dismiss/link helper with directory linking in SignInSettingsViewModel.ktSignInOptionswith aNetworkprovider mode, network identity metadata, and aNetworkSignInFailureclassifier that maps refusals to localized messagessignInBusystate; check guards inLoginViewModel.onLoginClick/onProviderClickandTvLoginViewModel.onLoginClickso password and network attempts stay mutually exclusive with device-code racesMacroscope summarized c4cb1ca.