Repository navigation
fix(api): move the API templates to the adapter releases with SameSite=Lax and the Origin check - #178
Merged
Merged
Conversation
…e=Lax and the Origin check Express 0.27.0, Fastify 0.18.0, and seamless-auth 0.7.0 for Go, Rust and Python. Corrects the allowedOrigins comments for the new default, and documents the SameSite=None option for a web app on another site in each API README. Closes #177
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.
Closes #177
Moves the five API starters to the adapter releases from the v0.24 CSRF change (fells-code/seamless-auth-server#283 and its Go, Python and Rust counterparts), so a new project gets the
SameSite=Laxcookie default and the Origin check.Changes
api/express@seamless-auth/express^0.25.0package-lock.jsonapi/fastify@seamless-auth/fastify^0.16.0package-lock.jsonapi/ginseamless-auth-gov0.6.0go.sumapi/axumseamless-auth0.6Cargo.lockapi/fastapiseamless-auth[fastapi]>=0.6,<0.7>=0.7,<0.8(0.7.0)uv.lockVersions were checked against npm, the Go module proxy, crates.io and PyPI.
requireAuthin Express 0.27.0 and Fastify 0.18.0 throws withoutauthServerUrlandaudience. Both templates already pass both, plusauthServerIssuer, so no code change was needed there. No other breaking change in the 0.26/0.27 (Express), 0.17/0.18 (Fastify) or Go/Python/Rust 0.7.0 changelogs touches the templates.allowedOriginsin Express, Fastify, Axum and FastAPI described the pre-0.27 default. It now says that without a list the adapter only admits an Origin on the API's own host (which would refuse the web app on its own port), and that passingUI_ORIGINS, even empty, replaces that with the origins CORS admits. All four adapters treat an empty list as set. The Gin comment was already accurate.SameSite=Laxdefault is kept. Each API README now says, next to the environment table that listsUI_ORIGINS, that a web app on another site sets the adapter'sSameSite=Noneoption with secure cookies left on:cookieSameSite: "none"(Express, Fastify),CookieSameSite: http.SameSiteNoneMode(Gin),.same_site(SameSite::None)(Axum),same_site="None"(FastAPI).Checks run locally
api/express,api/fastify:npm run check(typecheck, lint, format:check, 24 tests each) andnpm run buildpass.api/gin:gofmt -l .is clean;go vet,go build,go test ./...pass.api/axum:cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(13 tests) pass.api/fastapi:ruff check,ruff format --check,mypy,pytest(17 tests) pass.npm run validateandnpm run format:checkpass.Pinning
seamless-clito the release that carries this is fells-code/seamless-cli#380.