Repository navigation
fix: forward the pre-auth token on magic link verify and serve the confirm route - #8
Merged
Merged
Conversation
…nfirm route
GET /magic-link/verify/{token} now forwards the requesting device's pre-auth token when one is available: the client's bearer token in bearer transport, or the pre-auth cookie's token in cookie transport when it verifies. Without one it sends no Authorization and does not answer 401.
The bundled manifest is synced from seamless-auth-api, adding POST /magic-link/verify/{token}/confirm.
Merged
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.
Adapter support for the magic link verification change in seamless-auth-api 0.19.0.
Changes
GET /magic-link/verify/{token}forwards the requesting device's pre-auth token when one is available: the client's bearer token in bearer transport, or the pre-auth cookie's token in cookie transport, only when the cookie verifies. Without one it sends noAuthorizationand does not answer 401; the auth API then falls back to the client IP and user agent forwarded with the service token.src/seamless_auth/manifest.jsonsynced from the seamless-auth-api fix branch withscripts/sync-manifest.sh <path>(a local copy of itsadapter-manifest.json, since the fix is not on the API's public main yet). It addsPOST /magic-link/verify/{token}/confirm(credentialnone). The synced file saysapiVersion: 0.18.0; the API stamps the version at release, so a re-sync from the API's main after 0.19.0 ships will only change that field.confirmation_requiredbodies already pass through verbatim; a test now pins thatrequestedFromsurvives.GET /magic-link/checkanswering{ "message": "Success" }with no tokens sets no cookies (test added; no code change needed).Files
src/seamless_auth/_adapter.pytests/test_magic_link.py(new)src/seamless_auth/manifest.jsonREADME.mdChecks
This private fork runs no Actions, so the local output is below.
Release order
Part of the v0.19 security release (fells-code/seamless-auth-api#385), reviewed in a private fork. Compatible with the current auth API: the forwarded pre-auth credential and the confirm route are only used by API 0.19.0.