Version Packages - #165
Merged
Merged
Version Packages#165
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
September 13, 2026 15:42
5ae37aa to
a2ce45f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.16.0
Minor Changes
36d530b: Accept the auth API's access token as a bearer credential in
requireAuthandgetSeamlessUser.Both guards read
req.cookiesand nothing else, so a native client, which has no cookie jarand holds the auth API's own tokens, was rejected on every request to an adopter's routes.
requireAuthnow takes an optionalauthServerUrl+audiencepair; with both configured italso accepts
Authorization: Bearer <access token>, verified against the auth API's JWKS(issuer, audience, expiry) and required to carry
typ: "access", so a sign-in flow'sephemeral token is refused even though the same key signs it. The cookie wins when both are
present, and leaving the pair out keeps the guard cookie-only, which is what every earlier
version did. Half of the pair is a setup error.
getSeamlessUserresolves a bearer session too. The router options already carryauthServerUrlandaudience, so no new option is needed there: a request with no accesscookie but a valid bearer token is verified the same way and forwarded to
GET /users/measthe caller's identity, while a request with neither, or a token that fails verification,
returns
nullwithout an upstream call.On the bearer path
req.user.emailandreq.user.phoneare unset, because the access tokendoes not carry them;
getSeamlessUserhydrates the profile.Core exports
verifyAccessToken,extractBearerToken,authenticateBearer, andauthenticateRequest.getSeamlessUserin core takes an optionalbearer: { authorization, audience }. The JWKS memo thatverifySignedAuthResponseused moves to a shared module so bothverifiers share one instance per auth server. Fastify gains direct tests for its guards, which
until now were covered only through the plugin parity suite.
Tracks feat(guards): accept bearer tokens in requireAuth and getSeamlessUser #147.
0222376: Serve a bearer transport on the auth routes for native clients, and add
POST /refresh.Every proxied route assumed cookies: identity came from the cookie payload, session responses
were stripped of their tokens and minted into cookies, and silent refresh ran on the refresh
cookie. A native app has no cookie jar, so it could not sign in through the adapter at all, and
going around it to the auth API directly would bypass message delivery, client IP forwarding,
and the service token, and need the auth API exposed.
A request that carries
x-seamless-auth-transport: bearernow gets a bearer contract on thesame routes. The client presents the token a route needs in
Authorization: Bearer(theephemeral token
/loginor/registration/registerreturned on pre-auth routes, the accesstoken on access routes) and the adapter forwards it to the auth API as-is. Session-issuing
responses come back whole,
tokenandrefreshTokenincluded, with noSet-Cookie; the authAPI's signature on the access token is still verified before the body goes out.
ensureCookiesis skipped. A route that needs an identity and gets no bearer token answers 401 with the same
error it gives a missing cookie. The header rather than the presence of
Authorizationselectsthe transport, because the first request of a flow carries no token in either. Requests without
the header are served exactly as before.
POST /refreshis new in both adapters. In bearer transport it takesAuthorization: Bearer <refreshToken>and returns the rotated pair, passing the auth API's failure body through so aclient can tell
refresh_token_reusedfrom a transient error. Concurrent rotations of the sametoken are collapsed into one upstream call, since the auth API treats a replayed refresh token as
theft. In cookie transport it rotates the refresh cookie into fresh session cookies, for a client
that wants an explicit refresh.
Core:
AuthTransport,resolveAuthTransport,AUTH_TRANSPORT_HEADER,sessionResult(whatevery session-issuing handler now returns through), a
transportoption onloginHandler,registerHandler,finishLoginHandler, the OTP verify handlers,pollMagicLinkConfirmationHandler,switchOrganizationHandlerandfinishOAuthLoginHandler,transportandauthorizationoncheckProxyIdentity,transportonapplyResult,refreshBearerSession, andrefreshHandler. The parity suite drives a full bearer sign-inthrough both adapters.
Closes feat(transport): bearer transport mode for the auth proxy #163.
@seamless-auth/express@0.16.0
Minor Changes
36d530b: Accept the auth API's access token as a bearer credential in
requireAuthandgetSeamlessUser.Both guards read
req.cookiesand nothing else, so a native client, which has no cookie jarand holds the auth API's own tokens, was rejected on every request to an adopter's routes.
requireAuthnow takes an optionalauthServerUrl+audiencepair; with both configured italso accepts
Authorization: Bearer <access token>, verified against the auth API's JWKS(issuer, audience, expiry) and required to carry
typ: "access", so a sign-in flow'sephemeral token is refused even though the same key signs it. The cookie wins when both are
present, and leaving the pair out keeps the guard cookie-only, which is what every earlier
version did. Half of the pair is a setup error.
getSeamlessUserresolves a bearer session too. The router options already carryauthServerUrlandaudience, so no new option is needed there: a request with no accesscookie but a valid bearer token is verified the same way and forwarded to
GET /users/measthe caller's identity, while a request with neither, or a token that fails verification,
returns
nullwithout an upstream call.On the bearer path
req.user.emailandreq.user.phoneare unset, because the access tokendoes not carry them;
getSeamlessUserhydrates the profile.Core exports
verifyAccessToken,extractBearerToken,authenticateBearer, andauthenticateRequest.getSeamlessUserin core takes an optionalbearer: { authorization, audience }. The JWKS memo thatverifySignedAuthResponseused moves to a shared module so bothverifiers share one instance per auth server. Fastify gains direct tests for its guards, which
until now were covered only through the plugin parity suite.
Tracks feat(guards): accept bearer tokens in requireAuth and getSeamlessUser #147.
0222376: Serve a bearer transport on the auth routes for native clients, and add
POST /refresh.Every proxied route assumed cookies: identity came from the cookie payload, session responses
were stripped of their tokens and minted into cookies, and silent refresh ran on the refresh
cookie. A native app has no cookie jar, so it could not sign in through the adapter at all, and
going around it to the auth API directly would bypass message delivery, client IP forwarding,
and the service token, and need the auth API exposed.
A request that carries
x-seamless-auth-transport: bearernow gets a bearer contract on thesame routes. The client presents the token a route needs in
Authorization: Bearer(theephemeral token
/loginor/registration/registerreturned on pre-auth routes, the accesstoken on access routes) and the adapter forwards it to the auth API as-is. Session-issuing
responses come back whole,
tokenandrefreshTokenincluded, with noSet-Cookie; the authAPI's signature on the access token is still verified before the body goes out.
ensureCookiesis skipped. A route that needs an identity and gets no bearer token answers 401 with the same
error it gives a missing cookie. The header rather than the presence of
Authorizationselectsthe transport, because the first request of a flow carries no token in either. Requests without
the header are served exactly as before.
POST /refreshis new in both adapters. In bearer transport it takesAuthorization: Bearer <refreshToken>and returns the rotated pair, passing the auth API's failure body through so aclient can tell
refresh_token_reusedfrom a transient error. Concurrent rotations of the sametoken are collapsed into one upstream call, since the auth API treats a replayed refresh token as
theft. In cookie transport it rotates the refresh cookie into fresh session cookies, for a client
that wants an explicit refresh.
Core:
AuthTransport,resolveAuthTransport,AUTH_TRANSPORT_HEADER,sessionResult(whatevery session-issuing handler now returns through), a
transportoption onloginHandler,registerHandler,finishLoginHandler, the OTP verify handlers,pollMagicLinkConfirmationHandler,switchOrganizationHandlerandfinishOAuthLoginHandler,transportandauthorizationoncheckProxyIdentity,transportonapplyResult,refreshBearerSession, andrefreshHandler. The parity suite drives a full bearer sign-inthrough both adapters.
Closes feat(transport): bearer transport mode for the auth proxy #163.
Patch Changes
@seamless-auth/fastify@0.7.0
Minor Changes
36d530b: Accept the auth API's access token as a bearer credential in
requireAuthandgetSeamlessUser.Both guards read
req.cookiesand nothing else, so a native client, which has no cookie jarand holds the auth API's own tokens, was rejected on every request to an adopter's routes.
requireAuthnow takes an optionalauthServerUrl+audiencepair; with both configured italso accepts
Authorization: Bearer <access token>, verified against the auth API's JWKS(issuer, audience, expiry) and required to carry
typ: "access", so a sign-in flow'sephemeral token is refused even though the same key signs it. The cookie wins when both are
present, and leaving the pair out keeps the guard cookie-only, which is what every earlier
version did. Half of the pair is a setup error.
getSeamlessUserresolves a bearer session too. The router options already carryauthServerUrlandaudience, so no new option is needed there: a request with no accesscookie but a valid bearer token is verified the same way and forwarded to
GET /users/measthe caller's identity, while a request with neither, or a token that fails verification,
returns
nullwithout an upstream call.On the bearer path
req.user.emailandreq.user.phoneare unset, because the access tokendoes not carry them;
getSeamlessUserhydrates the profile.Core exports
verifyAccessToken,extractBearerToken,authenticateBearer, andauthenticateRequest.getSeamlessUserin core takes an optionalbearer: { authorization, audience }. The JWKS memo thatverifySignedAuthResponseused moves to a shared module so bothverifiers share one instance per auth server. Fastify gains direct tests for its guards, which
until now were covered only through the plugin parity suite.
Tracks feat(guards): accept bearer tokens in requireAuth and getSeamlessUser #147.
0222376: Serve a bearer transport on the auth routes for native clients, and add
POST /refresh.Every proxied route assumed cookies: identity came from the cookie payload, session responses
were stripped of their tokens and minted into cookies, and silent refresh ran on the refresh
cookie. A native app has no cookie jar, so it could not sign in through the adapter at all, and
going around it to the auth API directly would bypass message delivery, client IP forwarding,
and the service token, and need the auth API exposed.
A request that carries
x-seamless-auth-transport: bearernow gets a bearer contract on thesame routes. The client presents the token a route needs in
Authorization: Bearer(theephemeral token
/loginor/registration/registerreturned on pre-auth routes, the accesstoken on access routes) and the adapter forwards it to the auth API as-is. Session-issuing
responses come back whole,
tokenandrefreshTokenincluded, with noSet-Cookie; the authAPI's signature on the access token is still verified before the body goes out.
ensureCookiesis skipped. A route that needs an identity and gets no bearer token answers 401 with the same
error it gives a missing cookie. The header rather than the presence of
Authorizationselectsthe transport, because the first request of a flow carries no token in either. Requests without
the header are served exactly as before.
POST /refreshis new in both adapters. In bearer transport it takesAuthorization: Bearer <refreshToken>and returns the rotated pair, passing the auth API's failure body through so aclient can tell
refresh_token_reusedfrom a transient error. Concurrent rotations of the sametoken are collapsed into one upstream call, since the auth API treats a replayed refresh token as
theft. In cookie transport it rotates the refresh cookie into fresh session cookies, for a client
that wants an explicit refresh.
Core:
AuthTransport,resolveAuthTransport,AUTH_TRANSPORT_HEADER,sessionResult(whatevery session-issuing handler now returns through), a
transportoption onloginHandler,registerHandler,finishLoginHandler, the OTP verify handlers,pollMagicLinkConfirmationHandler,switchOrganizationHandlerandfinishOAuthLoginHandler,transportandauthorizationoncheckProxyIdentity,transportonapplyResult,refreshBearerSession, andrefreshHandler. The parity suite drives a full bearer sign-inthrough both adapters.
Closes feat(transport): bearer transport mode for the auth proxy #163.
Patch Changes