Repository navigation
fix: let same-origin /ory redirects leave the SvelteKit router so landing-page Register and Login reach Kratos (ADR-001072) - #447
Merged
Conversation
…outes, so landing-page Register and Login reach Kratos by a full page load, and that the excluded prefixes match the non-frontend routes in plecto/manifest.toml (ADR-001072) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…matcher that excludes the edge's non-frontend prefixes, so a redirect to same-origin /ory no longer fetches a Kratos __data.json that returns 404, and run the frontend unit tests when plecto/manifest.toml changes (ADR-001072) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
On a clean-host quickstart, clicking Register on the landing page ended on an error page at
/ory/self-service/registration/browser. Login fails the same way./registerand/auth/loginserver loads redirect to${KRATOS_PUBLIC_URL}/self-service/.... That URL is same-origin (/orybehind the edge proxy).src/routes/[...path]matched/ory/..., so the client fetched/ory/self-service/registration/browser/__data.json. Kratos answered 404./register/__data.json200, then/ory/.../__data.json404 twice.Fix (ADR-001072):
The catch-all becomes
src/routes/[...path=frontendPath].frontendPathparam matcher (src/params/, SvelteKit 3defineParams) rejects the prefixes thatplecto/manifest.tomlroutes away from the frontend:ory,api/v1/sse,v1/images/proxy.frontendPath.manifest.test.tsreadsplecto/manifest.tomland checks both directions:Adding a non-frontend edge route without updating the matcher now fails the unit tests.
alt-frontend-sv-unit-test.yamlruns onplecto/manifest.tomlchanges and sparse-checks outplecto.Test plan
origin/mainwith the URL stuck at/ory/self-service/{registration,login}/browser.v1/images/proxyfrom the list fails the drift test, namingplecto/manifest.toml:182.bun run test: 211 files, 2091 passed.bun run check: 0 errors, 0 warnings.bun run build./scripts/lint/run.sh alt-frontend-sv,./scripts/lint/run.sh repo(actionlint included).alt-harness frontend-e2e run: 6 affected specs passed,authanddesktop-chromiumprojects.docdag validate --immutable-since origin/main,alt-harness adr-gate --base origin/main🤖 Generated with Claude Code