Skip to content

feat(oidc): send per-application token lifetimes to the provider service - #539

Merged
Bccorb merged 2 commits into
mainfrom
feat/oidc-client-token-ttls
Nov 1, 2026
Merged

Bccorb merged 2 commits into
mainfrom
feat/oidc-client-token-ttls

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Per-application token lifetimes for the OpenID Provider (epic #387). Stacked on #538. Also carries the per-application PKCE and nonce opt-outs from #540, which was merged into this branch. Uses @seamless-auth/types 0.34.0-next.4 (fells-code/seamless-auth-types#140 adds the fields).

What changed

  • accessTokenTtlSeconds, idTokenTtlSeconds and refreshTokenTtlSeconds are stored in oidc_clients and set through the admin routes, but they never reached the provider service, so they did nothing. GET /oidc/clients/:id now sends them as urn:seamless:access_token_ttl, urn:seamless:id_token_ttl and urn:seamless:refresh_token_ttl, leaving out the ones that are unset.
  • No new bounds are needed. The admin schema limits access and ID tokens to 60 s to 24 h, which matches /oidc/sign's 24 h ceiling, and refresh tokens to 5 min to 90 days, which matches the payload store's 90 day ceiling.

Checks (against types 0.34.0-next.4)

  • npm run typecheck, npm run lint, npm run format:check: clean
  • npm run test:run: 2732 passed
  • Real stack with the edge branch: an application with ID 90 s and access 120 s got exactly those lifetimes, and an application without its own got 600 s for both. The logout, device, refresh race and step-up/resource/refresh/reuse e2e blocks were also run on this top-of-stack build and passed.

@Bccorb
Bccorb marked this pull request as ready for review November 1, 2026 01:26
@Bccorb
Bccorb added this pull request to stack #541 November 1, 2026 01:46
@Bccorb
Bccorb force-pushed the feat/oidc-client-token-ttls branch 2 times, most recently from 2511374 to a222dff Compare November 1, 2026 02:01
Base automatically changed from feat/oidc-atomic-consume to main November 1, 2026 02:12
Bccorb and others added 2 commits October 31, 2026 22:12
…clients (#540)

* feat(oidc): let a confidential application opt out of PKCE

* feat(oidc): per-application nonce requirement for clients without PKCE

---------

Co-authored-by: Brandon Corbett <Bccorb@users.noreply.github.com>
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