Skip to content

Renew from the provider's session, for installs that can - #150

Merged
vitramir merged 1 commit into
mainfrom
feat/renew-without-refresh-token
Aug 14, 2026
Merged

Renew from the provider's session, for installs that can#150
vitramir merged 1 commit into
mainfrom
feat/renew-without-refresh-token

Conversation

@vitramir

Copy link
Copy Markdown
Contributor

Wires renewal through a hidden frame against the provider's session, so an install can drop offline_access and hold no refresh token at all.

Inert unless it is dropped: with offline_access present oidc-client-ts renews from the refresh token and never opens the frame, so silent_redirect_uri goes unread and the gate never sees the path. The chart default still asks for it, so nothing changes for an install that keeps it.

The gate answers /silent-renew before AuthProvider mounts — from a route it would sit below the gate and the frame would run the whole sign-in flow in its own context.

Dropping offline_access against a provider this chart does not configure also needs <origin>/silent-renew registered there as a redirect URI; the app cannot detect that it is missing. The values file says so.

A refresh token is the only credential a tab holds long enough to be worth
stealing, and asking for offline_access is what gets one issued. The
alternative is to renew through a hidden frame against the session the
provider already keeps -- nothing persisted, and a cookie script cannot
read.

That only works where the frame is first-party to the issuer, so the
default still asks for offline_access and nothing here changes for an
install that keeps it: oidc-client-ts renews from the refresh token and
never opens the frame, so silent_redirect_uri goes unread and the gate
below never sees the path. It is set unconditionally because the library
throws on the frame path without it, not because it is always used.

The gate has to answer before AuthProvider mounts. Rendering the callback
from a route would put it below the gate, and the frame would run the
whole sign-in flow in its own context instead of answering its parent.

Dropping offline_access against a provider configured elsewhere also needs
<origin>/silent-renew registered there as a redirect URI. The app cannot
detect that it is missing -- the frame swallows the error and sessions end
at token expiry -- so the values file says so.
@vitramir
vitramir merged commit a078051 into main Aug 14, 2026
1 of 2 checks passed
@vitramir
vitramir deleted the feat/renew-without-refresh-token branch August 14, 2026 07:09
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.

1 participant