Skip to content

Version Packages - #291

Merged
Bccorb merged 1 commit into
mainfrom
changeset-release/main
Nov 21, 2026
Merged

Bccorb merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@seamless-auth/core@0.27.0

Minor Changes

  • 193298a: Tighten cross-site request protection when no allowedOrigins list is configured, and default the auth cookies to SameSite=Lax.

    Behaviour changes:

    • Without allowedOrigins, a state-changing request that is Sec-Fetch-Site: same-site, or that carries an Origin and no Sec-Fetch-Site (or none), must come from an Origin whose host equals the request's Host. It used to pass, so a page on a sibling subdomain could send a request that carried the session cookie. A same-site request with no Origin is now refused. Refusals answer 403 {"error":"cross_site_request_blocked"}. This applies to the auth routes and to the requireAuth and role guards on cookie sessions.
    • A Sec-Fetch-Site value the Fetch Metadata spec does not define is treated as cross-site and refused.
    • cookieSameSite now defaults to lax whatever cookieSecure says. It used to default to none when the cookie was secure.
    • checkOrigin in core takes a new host input. Without allowedOrigins, a caller that leaves it out has every request with a non-same-origin Origin refused.

    Express and Fastify read the host from req.host, which follows X-Forwarded-Host only behind a proxy the framework is told to trust (trust proxy, trustProxy). Next.js reads the Host header.

    What to do when upgrading: if your browser app is served from a different host than the adapter, or a proxy in front of the adapter rewrites Host, set allowedOrigins to the origins your app is served from (or configure the framework to trust the proxy). If your browser app is on a different site from the adapter, set cookieSameSite: "none" (with cookieSecure left on) to keep the cookie on its requests.

  • c835725: Verify the access token inside a session cookie against the auth API's JWKS in the Express and Fastify guards, and take the session's roles, permissions and organization from it alone.

    Behaviour changes:

    • requireAuth in @seamless-auth/express and @seamless-auth/fastify now requires authServerUrl and audience, and throws when it is constructed without them. The types mark both as required. Before, leaving them out gave a cookie-only guard that trusted the cookie's payload, so anyone holding cookieSecret could sign a cookie with any identity, roles or permissions. The Next.js guards already worked this way.
    • With the pair set, the guard verifies the cookie's inner access token (issuer, audience, expiry, typ: "access") and refuses the cookie when it does not verify or its sub differs from the token's. It also accepts the auth API's access token as Authorization: Bearer, as it already did when the pair was configured.
    • req.user.roles (and request.user.roles) is the verified token's roles claim, or [] when the token has none. It no longer falls back to the roles copied into the cookie from the login response. permissions, organizationRoles, organizationPermissions and organizationId come from the verified token too.

    What to do when upgrading: pass the same authServerUrl and audience you give createSeamlessAuthServer (or the plugin) to every requireAuth, plus authServerIssuer if you set one there. The guard fetches the auth API's JWKS once and caches it.

Patch Changes

@seamless-auth/express@0.27.0

Minor Changes

  • 193298a: Tighten cross-site request protection when no allowedOrigins list is configured, and default the auth cookies to SameSite=Lax.

    Behaviour changes:

    • Without allowedOrigins, a state-changing request that is Sec-Fetch-Site: same-site, or that carries an Origin and no Sec-Fetch-Site (or none), must come from an Origin whose host equals the request's Host. It used to pass, so a page on a sibling subdomain could send a request that carried the session cookie. A same-site request with no Origin is now refused. Refusals answer 403 {"error":"cross_site_request_blocked"}. This applies to the auth routes and to the requireAuth and role guards on cookie sessions.
    • A Sec-Fetch-Site value the Fetch Metadata spec does not define is treated as cross-site and refused.
    • cookieSameSite now defaults to lax whatever cookieSecure says. It used to default to none when the cookie was secure.
    • checkOrigin in core takes a new host input. Without allowedOrigins, a caller that leaves it out has every request with a non-same-origin Origin refused.

    Express and Fastify read the host from req.host, which follows X-Forwarded-Host only behind a proxy the framework is told to trust (trust proxy, trustProxy). Next.js reads the Host header.

    What to do when upgrading: if your browser app is served from a different host than the adapter, or a proxy in front of the adapter rewrites Host, set allowedOrigins to the origins your app is served from (or configure the framework to trust the proxy). If your browser app is on a different site from the adapter, set cookieSameSite: "none" (with cookieSecure left on) to keep the cookie on its requests.

  • c835725: Verify the access token inside a session cookie against the auth API's JWKS in the Express and Fastify guards, and take the session's roles, permissions and organization from it alone.

    Behaviour changes:

    • requireAuth in @seamless-auth/express and @seamless-auth/fastify now requires authServerUrl and audience, and throws when it is constructed without them. The types mark both as required. Before, leaving them out gave a cookie-only guard that trusted the cookie's payload, so anyone holding cookieSecret could sign a cookie with any identity, roles or permissions. The Next.js guards already worked this way.
    • With the pair set, the guard verifies the cookie's inner access token (issuer, audience, expiry, typ: "access") and refuses the cookie when it does not verify or its sub differs from the token's. It also accepts the auth API's access token as Authorization: Bearer, as it already did when the pair was configured.
    • req.user.roles (and request.user.roles) is the verified token's roles claim, or [] when the token has none. It no longer falls back to the roles copied into the cookie from the login response. permissions, organizationRoles, organizationPermissions and organizationId come from the verified token too.

    What to do when upgrading: pass the same authServerUrl and audience you give createSeamlessAuthServer (or the plugin) to every requireAuth, plus authServerIssuer if you set one there. The guard fetches the auth API's JWKS once and caches it.

Patch Changes

  • Updated dependencies [f24a5a1]
  • Updated dependencies [193298a]
  • Updated dependencies [c835725]
    • @seamless-auth/core@0.27.0

@seamless-auth/fastify@0.18.0

Minor Changes

  • 193298a: Tighten cross-site request protection when no allowedOrigins list is configured, and default the auth cookies to SameSite=Lax.

    Behaviour changes:

    • Without allowedOrigins, a state-changing request that is Sec-Fetch-Site: same-site, or that carries an Origin and no Sec-Fetch-Site (or none), must come from an Origin whose host equals the request's Host. It used to pass, so a page on a sibling subdomain could send a request that carried the session cookie. A same-site request with no Origin is now refused. Refusals answer 403 {"error":"cross_site_request_blocked"}. This applies to the auth routes and to the requireAuth and role guards on cookie sessions.
    • A Sec-Fetch-Site value the Fetch Metadata spec does not define is treated as cross-site and refused.
    • cookieSameSite now defaults to lax whatever cookieSecure says. It used to default to none when the cookie was secure.
    • checkOrigin in core takes a new host input. Without allowedOrigins, a caller that leaves it out has every request with a non-same-origin Origin refused.

    Express and Fastify read the host from req.host, which follows X-Forwarded-Host only behind a proxy the framework is told to trust (trust proxy, trustProxy). Next.js reads the Host header.

    What to do when upgrading: if your browser app is served from a different host than the adapter, or a proxy in front of the adapter rewrites Host, set allowedOrigins to the origins your app is served from (or configure the framework to trust the proxy). If your browser app is on a different site from the adapter, set cookieSameSite: "none" (with cookieSecure left on) to keep the cookie on its requests.

  • c835725: Verify the access token inside a session cookie against the auth API's JWKS in the Express and Fastify guards, and take the session's roles, permissions and organization from it alone.

    Behaviour changes:

    • requireAuth in @seamless-auth/express and @seamless-auth/fastify now requires authServerUrl and audience, and throws when it is constructed without them. The types mark both as required. Before, leaving them out gave a cookie-only guard that trusted the cookie's payload, so anyone holding cookieSecret could sign a cookie with any identity, roles or permissions. The Next.js guards already worked this way.
    • With the pair set, the guard verifies the cookie's inner access token (issuer, audience, expiry, typ: "access") and refuses the cookie when it does not verify or its sub differs from the token's. It also accepts the auth API's access token as Authorization: Bearer, as it already did when the pair was configured.
    • req.user.roles (and request.user.roles) is the verified token's roles claim, or [] when the token has none. It no longer falls back to the roles copied into the cookie from the login response. permissions, organizationRoles, organizationPermissions and organizationId come from the verified token too.

    What to do when upgrading: pass the same authServerUrl and audience you give createSeamlessAuthServer (or the plugin) to every requireAuth, plus authServerIssuer if you set one there. The guard fetches the auth API's JWKS once and caches it.

Patch Changes

  • Updated dependencies [f24a5a1]
  • Updated dependencies [193298a]
  • Updated dependencies [c835725]
    • @seamless-auth/core@0.27.0

@seamless-auth/nextjs@0.11.0

Minor Changes

  • 193298a: Tighten cross-site request protection when no allowedOrigins list is configured, and default the auth cookies to SameSite=Lax.

    Behaviour changes:

    • Without allowedOrigins, a state-changing request that is Sec-Fetch-Site: same-site, or that carries an Origin and no Sec-Fetch-Site (or none), must come from an Origin whose host equals the request's Host. It used to pass, so a page on a sibling subdomain could send a request that carried the session cookie. A same-site request with no Origin is now refused. Refusals answer 403 {"error":"cross_site_request_blocked"}. This applies to the auth routes and to the requireAuth and role guards on cookie sessions.
    • A Sec-Fetch-Site value the Fetch Metadata spec does not define is treated as cross-site and refused.
    • cookieSameSite now defaults to lax whatever cookieSecure says. It used to default to none when the cookie was secure.
    • checkOrigin in core takes a new host input. Without allowedOrigins, a caller that leaves it out has every request with a non-same-origin Origin refused.

    Express and Fastify read the host from req.host, which follows X-Forwarded-Host only behind a proxy the framework is told to trust (trust proxy, trustProxy). Next.js reads the Host header.

    What to do when upgrading: if your browser app is served from a different host than the adapter, or a proxy in front of the adapter rewrites Host, set allowedOrigins to the origins your app is served from (or configure the framework to trust the proxy). If your browser app is on a different site from the adapter, set cookieSameSite: "none" (with cookieSecure left on) to keep the cookie on its requests.

Patch Changes

  • Updated dependencies [f24a5a1]
  • Updated dependencies [193298a]
  • Updated dependencies [c835725]
    • @seamless-auth/core@0.27.0

@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 9072f67 to 88f4fec Compare November 20, 2026 04:12
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 88f4fec to 9c7fb53 Compare November 21, 2026 00:30
@Bccorb
Bccorb merged commit c10c242 into main Nov 21, 2026
6 checks passed
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