Repository navigation
feat(auth): Sign in with CoinPay - #167
Merged
Merged
Conversation
CoinPay is the house master account. Confidential OIDC client with PKCE S256, state and nonce via @profullstack/coinpay-onboard/oauth; redirect /api/v1/coinpay/oauth/callback. - Binds to the CoinPay sub in public.coinpay_identities (RLS on, service role only), never by email. A first CoinPay login creates a new auth user with an undeliverable placeholder address; the CoinPay email is unverified contact info on the identity row. Session minted server side (admin magic-link hash redeemed with verifyOtp), refused for unconfirmed accounts. - "Sign in with CoinPay" first on /login and /signup; Connect / Disconnect card in Settings (connect needs this session; disconnect refused when CoinPay is the only way in). Strings in all 19 locales. - Invite bonuses keep requiring a confirmed email: credits.ts treats the placeholder address as unconfirmed. - Tests: email collision gets a new account, connect needs a session, forged/edited/expired pending cookie, bad state/nonce, placeholder invite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
ThreatCrush Security Scan54 finding(s) HIGH/CRITICAL: 4 | MEDIUM: 29 | LOW: 21
…and 4 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
Sign in with CoinPay, the house master account.
cp_e15154efcfa3d1f4d519a224(OAuth 2.1, PKCE required, not legacy), auth code + PKCE S256 + state + nonce via@profullstack/coinpay-onboard/oauth0.3.1, redirecthttps://pairux.com/api/v1/coinpay/oauth/callback, scopesopenid profile email.subinpublic.coinpay_identities(migration20261029060000, already applied to prod by hand +NOTIFY pgrst). Never by email. A new CoinPay login creates a new auth user with an@coinpay.pairux.invalidplaceholder; the CoinPay email is unverified contact info only.generateLinkmagic-link hash redeemed withverifyOtp), refused for accounts whose email is unconfirmed. Pending invite /?ref=handled like/auth/callback.credits.tstreats the placeholder as unconfirmed, so CoinPay-only accounts staypending.pairuxCLI signs in through/cli/authorizeon the website, so it inherits CoinPay. The desktop app's password login is unchanged.Tests:
src/lib/coinpay-signin.test.ts+ a credits case.tscclean, web vitest 117 files / 1233 tests green.🤖 Generated with Claude Code