Repository navigation
v0.1.0
Minor Changes
-
793a30c: Refresh tokens, authorization codes and device codes are now single use under concurrency too. The API's consume answers whether this request marked the record used (
@seamless-auth/types0.34.0). A request that loses getsinvalid_grant. A lost refresh is handled as refresh token reuse, which ends the first-party session, and a lost code revokes its grant, as a sequential reuse does. A token request whose session ended while it ran now getsinvalid_grantinstead of a server error. -
dcf17cc: Sign users in to OIDC apps with the authorization code flow and PKCE, discovery and userinfo. Interactions finish only after a first-party sign-in through this service's own adapter, through four JSON routes the hosted pages call:
GET /interaction/:uid/details, andPOST /interaction/:uid/login,/consentand/abort. The provider grant is saved against the first-party session before its auth context is read, and every stored record and signature names that session, so the API's grant binding holds. ID tokens carry the scope claims plusacr,amrandauth_timefrom the API.- A recovery session cannot finish a sign-in, and
prompt=loginormax_agerefuse a session older than the request. - First-party clients have consent implied. Third-party clients do not exist while
third_party_clients_enabledis off, and see the consent page on every authorization when it is on. - The interaction routes refuse a state change unless
Sec-Fetch-Siteissame-originor theOriginis the issuer's, so a sibling subdomain cannot drive them.
Needs fells-code/seamless-auth-api#524 for a session signed in to more than one app.
- A recovery session cannot finish a sign-in, and
-
1697942: Client authentication per ADR D6. Confidential clients use
private_key_jwtby default, and each assertion is single-use through the API's replay store (a replay isinvalid_client, not a 500). Public clients usenonewith PKCE.client_secret_basicandclient_secret_postare offered only when the API allows client secrets (allow_client_secrets, read at startup), and only work for clients opted in on the API.A presented secret is checked with
POST /oidc/clients/:id/verify-secretbefore the library runs. When the API accepts it, the request carries a one-time value in its place, and the client's metadata carries that value for that request only, so this service never holds a client's real secret.client_secret_jwtand HS* algorithms are never offered. -
2532a7c:
pkce.requiredis now per client. PKCE stays required unless the API sendsurn:seamless:pkce_required: falsefor a confidential client (@seamless-auth/types0.34.0), as RFC 9700 section 2.1.1 allows. Such a client must sendnonceon any code request without PKCE that asks for an ID token, or getsinvalid_request, unless the API also sendsurn:seamless:nonce_required: false. A code request withoutopenidstill needs PKCE, since a nonce only binds an ID token. An opt-out on a public client is ignored, so PKCE stays required for it. -
d3b779e: Apply each application's
accessTokenTtlSeconds,idTokenTtlSecondsandrefreshTokenTtlSeconds, which the API now sends asurn:seamless:access_token_ttl,urn:seamless:id_token_ttlandurn:seamless:refresh_token_ttlclient metadata (@seamless-auth/types0.34.0). An access token for a resource takes the shorter of the resource's and the application's lifetime. Unset values keep the defaults (600 seconds for access and ID tokens, 14 days for refresh tokens), andttl.RefreshTokenis now set explicitly, keeping the library's rule that a public browser app's rotated token never outlives the one it replaced. -
4c74314: The device authorization grant (RFC 8628) for first-party clients with the device flow turned on:
/device/authreturns an 8-character base-20 user code (about 34.5 bits) that lives 10 minutes and anintervalof 5 seconds, and/deviceis the verification page in the hosted UI. The page names the app and warns, before any sign-in, to continue only on a device you started yourself. Every approval signs in again, even in a browser that is already signed in. Polling sooner than the interval getsslow_downand a longer interval, per device code. Code entry is limited to 10 a minute per address and 600 a minute per instance. Device-flow tokens never carryacr, including after a refresh, andacr_valuesandmax_ageare refused on device requests (ADR D10). Sign requests now name the grant (grantType), which needs@seamless-auth/types0.34.0 and the API with edge contract version 2. -
4d9492a: Hosted login and consent pages. A SPA on
@seamless-auth/react, served by this service at/interaction/:uidand the bundled sign-in paths (/login,/verify-email-otp,/register-passkeyand the rest), signs users in through this service's own first-party adapter, so every enabled method and every first-party protection applies. It finishes the interaction once the user is signed in, sends a recovery session to enrollment, and has the user sign in again when the app asks forprompt=loginormax_age.- Third-party clients get a consent page naming the client, the host it sends you back to, and what it asks for.
- Branding is read from the API's config when a page is served (
app_nametoday), with no build step. A config change shows within 30 seconds. - Every page gets a strict CSP: scripts from this origin only, styles from this origin or carrying the response's nonce,
frame-ancestors 'none', plusno-store,nosniffandno-referrer. - The adapter routes under
/authnow needSec-Fetch-Site: same-originor the issuer'sOriginfor a state change, like the interaction routes. - The resume cookie is now
__Host-oidc_resumewithPath=/, and resuming an authorization other than the one it names is refused. - The package ships the built pages in
dist/ui.createOidcEdgetakesuiDirto serve another build.
-
a167b9d: The hosted pages take their branding from the API's
hosted_uisystem config, read fromGET /oidc/configon each page load likeapp_name.appNameoverrides the name,logoUrlshows a logo (its origin is added to the page'simg-src),colorsandfontFamilybecome CSS variables in a<style>carrying the response's nonce. A branded palette replaces the dark palette, since it was chosen against a light page. The bundled sign-in screens now take their accent, text, surface and border colors from the same variables, so branding reaches every screen. Needs@seamless-auth/typeswithhostedUion the config response. -
a6de395: Token introspection (RFC 7662) and revocation (RFC 7009) at
/token/introspectionand/token/revocation, listed in discovery.- A client may introspect its own tokens. A resource server, registered as a confidential application linked to its resource, may introspect tokens whose
audis that resource. Every answer comes from the API's store, so a token whose session has ended is inactive at once. - JWT access tokens are now stored under their
jtiwhen issued, so they can be introspected and revoked. A presented JWT is mapped back to its record only after its signature checks out against the provider's keys, and thejtialone is not accepted as a token. - Revoking a refresh token ends that app's grant and its tokens, not the user's first-party session. Each revocation is recorded in the API's audit log as
token_revoked. - Both endpoints are limited to 1200 requests a minute per client IP, per instance.
- A client may introspect its own tokens. A resource server, registered as a confidential application linked to its resource, may introspect tokens whose
-
a81ad61: First release of the Seamless Auth OpenID Provider service, on
oidc-provider9.13 and@seamless-auth/express. It stores every provider model through the API's/oidc/payloads/*routes, reads clients from the API's registry, and signs every token throughPOST /oidc/sign, so it holds no private key and no database. The configuration is locked to the code flow with PKCE for every client, refresh rotation, no dev interactions and no dynamic registration. At startup it checksGET /oidc/configand refuses to run when the API has the provider disabled or speaks a different/oidc/*contract version. It answers only requests for the issuer's own origin. Ships as a Docker image and as an npm package that exportscreateOidcEdgefor mounting into an Express app.Requires a Seamless Auth API with the v0.21
/oidc/*routes and@seamless-auth/types0.34.0. -
45ea34c: Refresh token reuse detection and the client credentials grant.
- A rotated refresh token presented again still revokes the grant, and now also asks the API to end the first-party session it was issued under (
POST /oidc/sessions/:id/revoke, reasonrefresh_token_reuse). - A refresh reads the session's auth context, so the refreshed ID token carries the current
acr,amrandauth_time. Before this, any step-up after sign-in made/oidc/signrefuse every later refresh. client_credentialsis on for clients registered for it. The token is an RFC 9068 JWT for a resource (the one named withresource, or the client's only linked one, elseinvalid_target), withsubandclient_idset to the client and scopes cut to what it is allowed there.
- A rotated refresh token presented again still revokes the grant, and now also asks the API to end the first-party session it was issued under (
-
30b4115: Issue access tokens for a named API. With
resource=<identifier>(RFC 8707) the access token is an RFC 9068 JWT (typ: at+jwt) whoseaudis the resource, carrying only the scopes the application is allowed there and the resource's own lifetime, read from the API'sGET /oidc/clients/:id/resources. A resource the application is not linked to is refused withinvalid_target. A resource named once at authorization is used at the token endpoint too. Withoutresource, the access token is the same opaque userinfo token as before. First-party apps have resource scopes granted with the sign-in. The consent page lists them for third-party apps.Needs fells-code/seamless-auth-api#533 and
@seamless-auth/typeswithOidcEdgeRoutes.clientResources. -
b31200c: RP-initiated logout at
/session/end, confirmed on a hosted page. Signing out ends the provider session and the first-party session behind it through the API, which sends OpenID Back-Channel Logout tokens to every app the user signed in to with it. Signing out of the asking app only ends that app's grant. Discovery now listsend_session_endpoint,backchannel_logout_supportedandbackchannel_logout_session_supported, and ID tokens carrysidfor clients registered for back-channel logout. Needs the API with back-channel logout (fells-code/seamless-auth-api#409). -
b3048a8: Honour
acr_values,max_ageandprompt=loginfrom the API's auth context, with step-up in the hosted pages.- Every authorization from an existing provider session reads
GET /oidc/sessions/:id/auth-contextand carries the reportedacr,amrandauth_timeinto the tokens, so a step-up made elsewhere shows up on the next authorization and/oidc/signnever sees a stale value. A session the API reports as ended or in recovery goes back to sign-in. acr_valuesis met when the session's acr ranks at least the weakest value asked for (phrhsatisfiesphr).max_ageis met by the API'sauth_time, or an authentication during the request.POST /interaction/:uid/loginanswers409 { error: 'step_up_required', methods }instead ofreauthentication_required. The pages run the step-up through the adapter (/step-up/webauthn/*, or/totp/verify-mfafor freshness on a session with no acr), then post again with{ "afterStepUp": true }. If the requirement is still not met, the client receivesunmet_authentication_requirements.
- Every authorization from an existing provider session reads
Patch Changes
- 1397fcd: Document how the provider meets OAuth 2.1 and RFC 9700 in
docs/oauth-security.md, with the test behind each row, and cover RFC 8252 native clients (loopback redirects on any port, the IPv6 loopback, private-use schemes, and refusal of any other host, path or scheme). No behaviour change. - dfd86f2: Depend on
@seamless-auth/types^0.34.0, the stable release, instead of the 0.34.0 prerelease.