Repository navigation
feat(auth): sign in with the server's identity provider and the new TV sign-in - #448
Conversation
…V sign-in The phone signs in through the server's OIDC provider in a Custom Tab, offers "Not you? Switch account", and connects or disconnects providers in Settings. The TV shows an 8-digit code with a QR, follows opened and canceled states, and hides the password form on provider-only servers; phones approve its code. Every sign-out now runs one shared teardown, which also clears title art. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Important Review skippedToo many files! This PR contains 131 files, which is 31 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (131)
You can disable this status message by setting the
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 |
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. |
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: 84b5a116f1
ℹ️ 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".
|
Reviewed commit
These findings warrant changes before merge. This was a source review; I did not run local tests or device flows. The reviewed tests do not cover these scenarios. AI-assisted review by Codex. |
…oval gaps A provider sign-in or link left open in the browser now records the saved server's durable login id when it starts. The redirect is redeemed only while that login is unchanged, so a password sign-in or sign-out in between supersedes the flow, and a link still finishes after Android recreates the process. Password sign-in and sign-out also discard the pending flow. A silo://device?token= link can retry its lookup with Continue, and the nearby TV approval card names the account it signs the TV in as. 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: b36cdd1732
ℹ️ 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 now reports a TV's failed result that arrives before any code (a different server at that address, an expired code) instead of waiting out the 30-90 second timeout. A pairing connection that ended after a newer advertiser start no longer touches that start's listener or busy flag. The nearby TV card goes away and its pairing is cancelled when the route hides the offer. In Sign-in settings, Cancel stops a link ticket request still under way, and identities are shown only while the same login is signed in. A TV approval whose sign-in context changed no longer cancels a password attempt made since. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Addressed the four findings from the review of 84b5a11 in b36cdd1:
d0600a0 addresses the Kody findings on b36cdd1; each thread has its reply. The iss start-origin check, PKCE and redeem-at-saved-base logic is unchanged. Validation: unit tests for shared, android-shared, androidApp and androidTvApp, |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0600a015a
ℹ️ 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 TV polls a resumed code only while the sign-in context it was started under is unchanged, and withdraws an expired code that failed to poll before asking for a new one. On the phone, a code lookup goes only to the server chosen when it started, a token link always uses the active server, an unknown lookup status offers no decision, and nearby approval stops when the card can't name the account. Provider discovery for a URL no longer depends on the active server's update verdict. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
When a nearby phone approved the code, the sign-in screen now waits up to five seconds for that session to finish its result and done exchange before routing on, so the phone doesn't report a failed pairing for a TV that signed in. A completed session routes on after its own dwell as before. 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:
|
Consuming the sign-in success flag changes the effect's key, so doing it before the wait cancelled the wait and its fallback route. It is consumed after the wait now. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 904fb7aa8a
ℹ️ 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".
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:
|
Sign-in settings now ignores a provider link result for another saved server, so switching servers before opening Settings doesn't show one server's "Connected" or failure on the other. 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:
|
The "Connected" message after a provider link is shown only if the link's server is still the active one once the section has reloaded. 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: 1fa464b9d0
ℹ️ 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".
… them A TV pairing attempt that outlived its connection (its session save can't be cancelled) no longer reports its result into the newer connection. The "Connected" message after a provider link also requires the same login, not only the same server. 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: f4dbddcdc9
ℹ️ 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 nearby-TV card and its discovery are now off on the audiobook player and book reader routes too, not only the video player and cast remote. 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:
|
The link under the provider buttons picks another account at the identity provider, not another way into Silo, which read wrong on a server with password sign-in off. With one provider it now says "Use a different <provider> account"; with several it stays generic and opens the chooser. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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:
|
#747) Release builds of the Android TV app never advertised st=login from the sign-in screen, so phones couldn't offer to sign the TV in even though the screen tells people to open Silo on their phone. The gate waited for both phone apps to handle sign-in TVs; the Android app has since 1.0.0 (20) (#448) and the iPhone app since silo-apple#579, and Apple TV turned its gate on in every build with silo-apple#859. Closes #742 Co-authored-by: Claude Opus 5.5 <[email protected]>
Problem
Related issue: Silo-Server/silo-server#1799
Validation tasks: changes #336 C1; changes #337 C1, C2, C3, C4
Silo servers can now let people sign in with an identity provider, either OIDC (Authentik, Keycloak, Authelia, Pocket ID and others) or LDAP (Silo-Server/silo-server#1799). The Android phone app only offered a password form, so people on those servers had no way to sign in. The Android TV app offered a password form even where passwords are turned off. The server's TV sign-in also changed: codes are now eight digits, a phone opening a request is reported back to the TV, and a TV can withdraw its own request.
Solution
Provider sign-in on the phone.
issequals that address's origin, and redeems the code only there, so a sign-in that comes back from another server is discarded.select_account.Sign-out. Settings, the profile menu and "Switch account" now share one cleanup (
SignOutTeardown). It saves pending settings first and clears every per-profile cache, title art included. Main's Settings sign-out didn't clear title art.Settings → Sign-in lists the linked provider account, with Connect and Disconnect. Connect asks for the account password first; LDAP accounts link with their directory username and password. The section says when the provider is the only way to sign in, and it's hidden on servers without provider sign-in.
Android TV sign-in.
/activateaddress.Approving a TV from the phone.
The vendored API v2 fixtures are synced from the server PR's commit. New dependencies:
androidx.browser1.10.0 for Custom Tabs, andcoil-svg(same version as Coil) for provider icons. The lockfiles and verification metadata only gain entries.Validation
:androidApp:assembleDebugand:androidTvApp:assembleDebugpass.main:issrefusal, account switching, and Settings connect and disconnect.mainplus these changes, installed over an existing install on a physical Pixel, launches and keeps the app's data.Risks
password_change_required. This predates the branch and needs its own follow-up.AI Disclosure
issstart-origin rule, a background-poll race, and approval without switching servers; all were fixed. Mutation runs covered the device-link and withdraw rules.Note
Add server identity-provider sign-in and phone-based TV sign-in to Android apps
NativeSignInCoordinator,SignInOptions).CompanionPairingCoordinatorflow that matches the TV's advertised deployment identity to a saved server.SignOutTeardown; settings gain an external sign-in section for linking/unlinking OAuth and directory identities.ServerIdentityApi), external sign-in provider discovery, and identity-bearing device-login links are added to the shared network and navigation layers.PairingFailureCode),CompanionPairingApprovaldropstvMatchCode, the legacyQrLoginCard/MatchCodeTilesTV UI andActivePairingPanelinTvServerSetupScreen.ktare removed, and TV sign-in advertising is debug-build-only (AndroidTvModule).Macroscope summarized 617646e.