Repository navigation
Connect logins that share a verified email, after the owner confirms - #3
Merged
Merged
Conversation
A new login whose provider-verified email already belongs to an account no longer creates a second account. It is held for ten minutes in this browser and connected only when the browser signs in with one of the account's existing logins. Unverified emails never match; emails stay private to the owner and are never shown to applications. 🤖 Built with SMT <smt@agora.build>
Signing in to the matching account now only readies the held login; the portal then asks to connect it and does so on a same-origin POST. The hold cookie is __Host- prefixed over HTTPS, confirming sign-ins are refused from other sites, and a held login can become a separate account instead. Identity lookup no longer returns emails, a failed GitHub email lookup keeps the stored email, and only ASCII addresses match. 🤖 Built with SMT <smt@agora.build>
🤖 Built with SMT <smt@agora.build>
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.
Why
A person who signs in with Google one day and GitHub the next, using the same email, should end up as one Agora.Build user. Until now, signing in with a second provider created a second account unless the person had first connected it from the Account page.
What changes
/user/emailsmarks it verified. This adds theuser:emailscope.email_verified.__Host-house_linkover HTTPS, so a sibling subdomain can't plant one./api/me, Account page). Apps never see them: not through/oauth/userinfo, not through an app token reading/api/me, and not through identity lookup, which now returns only provider, issuer and subject.docs/platform.mddescribe the flow.Accounts that already share an email are not merged. This only prevents new duplicates.
Verification
npm test: 66 pass, 0 fail, 1 skipped (PostgreSQL, which needs a database). The new tests cover:__Host-cookie, and no emails in identity lookup or app readsfeat/stoa-world(PR Add the Stoa: walkable spaces with live presence, rooms, and calls #2): 294 pass. Deployed locally with PostgreSQL and checked: pages load, and the pending-link endpoint answers.Known limits
Generated with SMT smt@agora.build