Skip to content

Atmosphere login#54

Open
chris-pardy wants to merge 2 commits into
ATProtocol-Community:mainfrom
chris-pardy:atmosphere-login
Open

Atmosphere login#54
chris-pardy wants to merge 2 commits into
ATProtocol-Community:mainfrom
chris-pardy:atmosphere-login

Conversation

@chris-pardy

Copy link
Copy Markdown
Contributor

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.

chris-pardy-newfire and others added 2 commits July 1, 2026 16:08
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for referrer_did

2 participants