Repository navigation
c0upons accounts on the forum: bridge host endpoints - #80
Merged
Merged
Conversation
/api/v1/bridge/authorize and /token (@profullstack/bridges, OAuth 2.1 code + PKCE): the forum at /bbs signs c0upons members in, silently when they are already signed in here. sub is the member's CoinPay DID, so CoinPay sign-in on the forum lands on the same account. Off unless BRIDGE_TSBB_SECRET is set. lib/members.ts: the CoinPay name is remembered at sign-in (sessions carry only the DID); the table creates itself, as migrations are not run on deploy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| export async function memberByDid(did: string): Promise<Member | null> { | ||
| await ensureTable(); | ||
| const rows = await getDb().sql`SELECT did, name, email FROM members WHERE did = ${did}`; |
ThreatCrush Security Scan32 finding(s) MEDIUM: 29 | LOW: 3
Snippets are redacted; ThreatCrush never prints matched credential material. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
c0upons members are signed in to the forum at https://c0upons.com/bbs automatically. If they're signed in here, they arrive there signed in, with no prompt.
GET /api/v1/bridge/authorizeandPOST /api/v1/bridge/token, via @profullstack/bridges: OAuth 2.1 authorization code + PKCE S256. The one client is the forum (tsbb), and its callback is matched exactly. The bridge stays off (404) unlessBRIDGE_TSBB_SECRETis set; it's already in thec0upons--prodvault.subis the member's CoinPay DID, andnameis their CoinPay name. No email is passed as verified, because CoinPay doesn't verify emails. The forum also offers "Continue with CoinPay", which uses the same DID, so either way in reaches one forum account.lib/members.ts: remembers the CoinPay name at sign-in, since sessions carry only the DID. The table creates itself, because migrations don't run on deploy. Members signed in before this change get their name the next time they sign in.Pairs with profullstack/tsbb#41. Typecheck is clean. Lint fails only on errors that already exist on master, none in these files.
🤖 Generated with Claude Code