Atmosphere login#54
Open
chris-pardy wants to merge 2 commits into
Open
Conversation
Accept a referrer_did DID hint (carried from another atmosphere app) at the login + authorize entry points and use it to offer a fast, one-tap sign-in. It is a hint only; the destination still runs its own OAuth. - auth.authorize accepts referrerDid and uses the DID as the OAuth target identifier when no handle is supplied; the callback resolves the handle from the DID's public profile. - /api/auth/atproto/authorize accepts referrer_did. - New auth.getReferrerLogin resolves the DID -> handle/avatar and precomputes the authorize URL; /login?referrer_did= renders a "Continue as @handle" CTA. - Document the referrer_did convention on the developer API page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add withReferrerDid(url, did): appends a referrer_did query param to absolute http(s) URLs, preserving existing query/hash and overwriting a stale value; leaves relative/non-http URLs and did-less calls untouched. Wire it into the product-detail "Explore" button so a logged-in viewer carries their DID to the app they open. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
144e8d8 to
a46330f
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.
Resolves #53
This adds support for a referrer_did parameter first for visitors coming to the atstore and then for all it's outbound app links.
For products that implement reading the parameter you can just be logged in following an oauth consent screen.
The important thing to note is that this doesn't have any impact on sites that don't adopt it.