feat(server,ui): able sign-in follow-ups — whitelabel copy/i18n + assertion renewal (ABLE-2) - #362
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two gaps left by #361 (ABLE-1): the sign-in surface still shows account.book.pub-branded copy even when whitelabel able delegation is active (violating the silent-delegation directive), and bridged assertions expire after 1 hour with no renewal — users get signed out hourly despite the server holding (unused) refresh tokens. Board: ABLE-2.
Solution
packages/ui): when the able probe succeeds, all sign-in copy switches to neutral OpenBook strings (account.signin.able.*, "OpenBook identity") via the typed i18n mechanism, translated in all four locales (en/de/ja/zh) with a leak-guard test asserting noaccount.book.pub/account.able.onlineappears in able copy. ManualCodeEntry (deep-link paste, inapplicable to the able flow) is hidden in able mode. Inactive-mode copy is untouched and test-pinned.packages/server):POST /api/auth/oauth2/refresh/able— caller proves possession of the latest bridge assertion (EdDSA-verified against the bridge issuer's own key, ≤5-min post-expiry grace,jti-bound to the stored refresh token so a stolen older assertion cannot chain); the stored refresh token is atomically consumed (single-statementDELETE…RETURNING) before the IdP exchange, rotated on response, and a fresh 1-hour assertion is minted.DELETEon the same route clears the stored token on account removal (same assertion binding, header-auth, not CSRF-able). 30/min IP rate limiter checked before any crypto. Migration 0030 adds theassertion_jticolumn.AccountProvider): silent auto-renew ~60s before expiry with rotation of the local assertion; just-expired recovery on activation; rejected (401/403) renewal surfaces the existingrejectedReautherror instead of dead-ending; failure falls back to the existingidentityExpiredre-sign-in path.Before / After
"Continue with account.book.pub" + manual code entry
neutral OpenBook copy, manual entry hidden
AccountProvider.test.tsxrenewal suite)ableOidc.test.tsjti-mismatch case)Test procedure
All IdP interaction stubbed; no network in tests.
Operational notes
ABLE_OAUTH_*pair. Migration 0030 is additive.jti); consumed-but-failed exchanges fail closed into re-sign-in; able-bridge subjects sit outside the OB-106 revocation set (revocation = remove the account or unset the env); behind a reverse proxy the rate limiter collapses to a shared bucket — fails closed (renewal DoS ⇒ re-sign-in prompt, never open access). Comments in code document all three.Verify (exit 0): sdk 546/546 · ui 2319/2319 · app 7/7 · server 1326 passed + 6 skipped · mcp + e2e green
Reviews cleared: code (Quinn), security (Sasha — jti hardening applied), design (Devon — copy/i18n/UX)