Skip to content

Retire GIS/One-Tap silent renewal; rename /auth/refresh → /auth/session (bd-s042qcxj) - #417

Merged
shikokuchuo merged 4 commits into
mainfrom
feature/bd-s042qcxj-retire-onetap-renewal
Jul 27, 2026
Merged

Retire GIS/One-Tap silent renewal; rename /auth/refresh → /auth/session (bd-s042qcxj)#417
shikokuchuo merged 4 commits into
mainfrom
feature/bd-s042qcxj-retire-onetap-renewal

Conversation

@shikokuchuo

@shikokuchuo shikokuchuo commented Jul 27, 2026

Copy link
Copy Markdown
Member

Strand: bd-s042qcxj (epic bd-qxgoti2b, slice B2) · Plan: claude-notes/plans/2026-07-27-retire-gis-onetap-renewal.md

Why

One-Tap silent renewal is no longer needed. With server-minted sliding sessions (bd-ey6jg70f, #414), the hub itself re-issues the session cookie with a fresh, later-expiring token on each authenticated /auth/me — and useSessionKeepAlive sends one periodically. Renewal is now entirely server-side (idle 7 d / absolute 30 d); the browser never has to go back to the IdP for a new credential.

What changed

  • Client: removed the One-Tap renewal machinery — useSilentRenewal/SilentRenewalOpts, useGoogleOneTapLogin, useAuth's triggerRefresh + refresh timers, and authService.refreshToken(). Definitive 401s now route to expireSession; network errors stay no-ops (evidence-based logout, bd-3o8zmz46). Kept the GIS login button + signOut.
  • Server: renamed /auth/refresh/auth/session (logic unchanged). It was never a One-Tap artifact — it's the direct-JSON login path for Generic OIDC frontends, retained for the deferred PKCE work (B1).

Behavior: a definitive session end (logout-everywhere / absolute cap / idle) now shows the login screen instead of a silent One-Tap restore. Everyday renewal stays invisible (server-side slide).

Verification

cargo nextest -p quarto-hub 371 pass · cargo xtask verify --skip-hub-build green · hub-client build:all clean, test:ci 740+109+129 pass. Rename confirmed on the real hub binary: POST /auth/refresh → 404, POST /auth/session → 401/403 (never 404). Full browser GIS flow not exercised (needs a real Google-OIDC hub).

Renewal-only scope: remove the One-Tap client machinery, keep the GIS
login button + /auth/callback, and keep+rename the /auth/refresh server
endpoint to /auth/session (its true role is the direct-JSON credential
login path for Generic OIDC frontends). Child of epic bd-qxgoti2b.
…on (B2, bd-s042qcxj)

Server-minted sliding sessions (bd-ey6jg70f) made the browser's GIS One-Tap
silent renewal redundant: the hub re-issues the session cookie server-side on
authenticated HTTP activity, driven by useSessionKeepAlive's /auth/me probe.
This removes the One-Tap renewal path entirely on the client and corrects the
server endpoint's name.

Client (renewal removed):
- AuthProvider: drop useSilentRenewal + SilentRenewalOpts from the interface,
  noop, and MockAuthProvider capture.
- GoogleAuthProvider: drop useGoogleOneTapLogin + the useSilentRenewal impl;
  keep SignInButton + signOut.
- useAuth: delete triggerRefresh/refreshEnabled/isRefreshing/refreshDeadline/
  settleRefresh/abandonRenewal/REFRESH_BUFFER_MS/REFRESH_VERDICT_TIMEOUT_MS and
  the pre-expiry refresh timer. Every definitive 401 (refocus, expiry re-check)
  now routes to expireSession; mount 401 stays "not signed in" (no sessionExpired
  flag); network errors remain no-ops (evidence-based logout, bd-3o8zmz46).
- useAuthProbe/useSessionKeepAlive: drop the triggerRefresh opt. Probe keeps its
  two-strike debounce (first 401 is now a no-op, second consecutive 401 rejects);
  keep-alive ends the session on a definitive 401.
- authService: remove refreshToken() (its only /auth/refresh caller).

Server (endpoint kept + renamed, logic unchanged):
- /auth/refresh → /auth/session; auth_refresh → auth_session; RefreshRequest →
  SessionRequest. It is not a One-Tap artifact — it is the direct-JSON
  credential-submission login path for Generic OIDC frontends (the counterpart
  to form-post /auth/callback), and stays for the deferred public-client work
  (B1). CSRF (X-Requested-With) and dual-credential-400 behavior unchanged.

Behavior change (intended): on a definitive session end (revocation / absolute
cap / idle), the SPA now shows the login screen instead of silently restoring
via One-Tap. Day-to-day renewal stays invisible (server-side slide).

Plan: claude-notes/plans/2026-07-27-retire-gis-onetap-renewal.md
@posit-snyk-bot

posit-snyk-bot commented Jul 27, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@shikokuchuo
shikokuchuo marked this pull request as ready for review July 27, 2026 12:36
@shikokuchuo
shikokuchuo merged commit 953f0a2 into main Jul 27, 2026
8 checks passed
@shikokuchuo
shikokuchuo deleted the feature/bd-s042qcxj-retire-onetap-renewal branch July 27, 2026 13:02
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.

2 participants