Repository navigation
Releases
v0.4.1
Patch Changes
- 73b81ca: A first-party native client gets a grant of its own for each authorization again. Since 0.4.0 a step-up or second sign-in reused the grant of the first one, so an app that revoked the refresh token it replaced also ended the new sign-in, and a backend's account notices for that user answered
notice_unknown_user. A sign-in after a sign-out that ended the grant also stopped on "We could not confirm your account". A remembered grant that has ended is now replaced for any first-party client.
v0.4.0
Minor Changes
-
307f05d: Carry roles, permissions and custom claims in provider tokens (#47).
- New scopes
permissions(roles,permissions,org_id,org_roles,org_permissions, orpermissions_omitted) andcustom_claims(every custom claim the API resolves for the user and the application). They appear in ID tokens,/userinfo, and a user's RFC 9068 access token for a resource when the grant holds the scope. The consent page describes both. - The values come from the API's
/oidc/accounts/:idand the API signs only what it computes again, so the edge cannot add or change one. Reserved claim names are never released, and the permission claims are released whole or not at all. - When the API refuses a sign with
claims_mismatch(a role or membership changed between the account read and the sign), the edge reads the account again and signs once more, so the token request succeeds with the new values. A second mismatch answersserver_error(500) with a description. Other refusals are not retried. org_idnow names the session's active organization rather than the user's oldest membership. This changesorg_idunder theseamlessscope too.- Needs a seamless-auth-api release that returns these claims and signs them. Against an older API none are released.
- Depend on
@seamless-auth/types^0.40.0for the shared reserved claim list, the account claims schema and theclaims_mismatchrefusal code.
- New scopes
-
18b472c: The edge now follows the API's provider key rotation without a restart. It used to load the signing keys once at startup, so after the API rotated its active key every token request failed with
unknown_keyuntil the edge restarted, and/jwksand JWT access token introspection kept the startup keys. It now re-reads the keys every five minutes and at once when the API refuses a key as unknown (at most the request that meets the rotation fails), and/jwksserves the current set. Embedders can set the interval with the newsigningKeyRefreshMsoption (0turns the timer off). A rotation to a key with a different algorithm is refused with a logged error and still needs a restart.SigningKeyRingis exported for custom setups. -
18b472c:
TRUST_PROXYnow takes a hop count (2for a CDN in front of a load balancer) or a comma-separated list of proxy addresses and subnets (10.0.0.0/8, 172.16.0.5, or Express'sloopback,linklocalanduniquelocal), and is passed to Express'strust proxyas is. Behind more than one proxy the edge used to forward the last proxy's address as the client IP, so users shared the API's per-IP rate limits and lockouts.truestill means one hop andfalsenone, so existing deployments are unchanged; a value that is neither a hop count nor valid addresses now stops the service at startup. Keep the container port reachable only through the proxy.
Patch Changes
-
bfff063: Depend on
@seamless-auth/coreand@seamless-auth/express^0.26.0. On 0.x,^0.23.0stopped at 0.23, so the edge ran on 0.23 and an application installing the provider got a second, older copy of both. The edge now has the adapter fixes from 0.25: the CSRF origin check on form posts to the auth routes (seamless-auth-server#256), no replay of a completed bearer refresh rotation (#258), no client-chosen client IP under atrust proxythat trusts every address (#257), and a bundled adapter manifest with the v0.23 routes.The hosted pages build against
@seamless-auth/react0.20 and@seamless-auth/client0.9. Client 0.8.2 sent body-less requests such as the passkey step-up start without a JSON content type or the transport header, and adapters from 0.25 refuse those with 415, so step-up needs the newer client. -
216b785: The confirmation for a native client now names the account as well as the client.
GET /interaction/:uid/detailsreturnsaccount: { identifier }(the account's email, or its phone number if it has none), oraccount: nullunless the browser is signed in as the interaction's account and the API can describe it. The hosted "Continue to ?" card shows the identifier, and with no account to name it offers only Cancel. If you serve your own pages throughuiDir, showaccount.identifierbeside the client name, send{ "confirmed": true }only from a real click, and do not offer to continue whenaccountisnull. -
7858f18: A device client polling an expired device code faster than its interval now gets
expired_token, so it stops, rather thanslow_downon every poll. The poll throttle only tracks codes that have not expired. With an API that keeps expired device codes readable for a while (seamless-auth-api#542), the token endpoint answersexpired_tokenfor them; a code the API does not know still getsinvalid_grant. -
7858f18: Errors the provider cannot send back to the app now render on the hosted pages, with your branding, instead of the library's default "oops! something went wrong" page. That covers an unknown
client_id, an unregisteredredirect_uriat/authorize, and a refused/session/end(an unregisteredpost_logout_redirect_uri, or anid_token_hintthat cannot be read). The page shows the error code, the provider's description and a plain explanation, and answers with the hosted pages' CSP andno-store. A server error shows a generic description. -
7858f18: The hosted pages meet WCAG 2.2 AA with the default palette and a sound custom one (see
docs/accessibility-audit.md).- The sign-in screens' mode toggle, error text and hovered button now take this service's palette, and follow
hosted_uibranding, instead of fallback colors that fell below 4.5:1. - Text field edges are darker (
#7a828elight,#8a93a0dark) so they meet 3:1, which also darkens card borders. - Sign-out, device and error pages are titled for what they do rather than "Sign in to ".
- The device code error is tied to the code field.
- When the hosted pages render with a
hosted_uipalette whose pairs fall below AA contrast, the service logs one warning naming each pair. Nothing is refused.
- The sign-in screens' mode toggle, error text and hovered button now take this service's palette, and follow
-
18b472c: A failure while finishing a login no longer leaves a grant behind, and unexpected errors are answered as JSON.
POST /interaction/:uid/loginsaves the grant before it reads the auth context; when that read failed (the API unreachable, say), the grant stayed and bound the first-party session to the client without a finished sign-in. The edge router also had no error handler, so such failures reached Express's default handler, which answers HTML with a stack trace wheneverNODE_ENVis notproduction. They now answer500 {"error":"server_error"}(logged by name and message), and a malformed request body answers its 4xx status with{"error":"invalid_request"}. -
18b472c:
/session/endno longer signs a browser out of the hosted pages when it has no provider sign-in. The library ends an empty provider session without a confirmation page, and the edge used to clear the first-party adapter cookies on that automatic post, so any site that sent a browser to/session/endsigned it out. The first-party session and its cookies are now ended only when the provider session had an account and the user confirmed on the hosted page. -
18b472c: A first-party native client (
application_type: native) no longer gets a code without a click. Any program on the device can listen on a loopback port or claim a private-use scheme, so a signed-in user's browser could otherwise hand a code to it with no interaction (RFC 8252 section 8.6). The hosted pages now show a "Continue to " confirmation for every native client request, after sign-in and on later requests that ride the provider session, andPOST /interaction/:uid/consentanswers403 confirmation_requiredfor a native client's prompt unless the body is{ "confirmed": true }. A custom hosted UI must send that body from the user's click. Web clients and device-flow approvals are unchanged. -
7858f18: A request object that asks for
response_mode=form_postnow gets itsrequest_not_supportedrefusal by form post rather than in the query string. Request objects are still not supported. Onlyresponse_modeis read from the refused object, without verifying it, and only the valueform_postchanges anything: the error still goes only to the request's ownredirect_urionce it is checked against the client's registered URIs, and no other value from the object is used or shown. This lets the Form Post OP conformance profile passoidcc-unsigned-request-object-supported-correctly-or-rejected-as-unsupported. -
18b472c: The device poll throttle and the resume cookie check now match paths the way the provider's router does. A device client polling
/token/was never toldslow_down, because the throttle only recognised the exact path/token; it now follows the provider's own routing, so every spelling the provider accepts is throttled. The check that a resumed authorization is the one the resume cookie names now also covers/authorize/<uid>/and a differently cased/AUTHORIZE/<uid>. -
abb4834: Depend on
@seamless-auth/types^0.36.0, which adds the session exchange contract.
v0.3.0
Minor Changes
- 047779c: A user's JWT access token for a resource (RFC 9068) now carries the session's
acr,amrandauth_time, the same values the ID token states, and introspection returns them. A resource server can require a recent phishing-resistant sign-in on a route from the token alone (RFC 9470), and a refreshed token carries the session's current values, so a step-up shows on the next refresh. Device-flow and client credentials tokens carry none of the three, and opaque/userinfotokens are unchanged. Needs no API change: Seamless Auth API 0.22.0 signs these claims and checks them against the session.
Patch Changes
- 7c86020: Device-flow ID tokens no longer carry the approving session's
amrandauth_time, first or after a refresh. Seamless Auth API 0.22.0 refuses to sign any device-flow token that statesacr,amrorauth_time(ADR 0001 D10), so a device-flow request asking foropenidended inserver_erroragainst it.
v0.2.0
Minor Changes
- faecaf8: Bind each sign-in to its client through the API. The login step presents the user's access token to
POST /oidc/sessions/:id/bind, and a browser that already has a provider session binds a new client from its access cookie, or is asked to sign in again when it has none. Requires a Seamless Auth API that speaks provider contract version 3.
v0.1.1
Patch Changes
- 1f8803f: Depend on
@seamless-auth/coreand@seamless-auth/express^0.23.0, which carry the fix for proxying the user's identity right after a silent refresh, and build the hosted pages against@seamless-auth/react^0.19.2.
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...