Skip to content

feat(pass): Profullstack Pass grants Pro until it expires - #271

Merged
ralyodio merged 1 commit into
mainfrom
feat/coinpay-pass
Nov 7, 2026
Merged

ralyodio merged 1 commit into
mainfrom
feat/coinpay-pass

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Profullstack Pass on nichedb.dev.

  • packages/payments/src/coinpay-pass.js: reads the pass claim (active only with a future expires_at), inserts one free Pro term (plan pro, price 0) from now until the pass expires, grant_ref = coinpay-pass:<coinpay sub>:<expires_at>, idempotent on the existing (user_id, grant_ref) index. isProUser / activeMembership pick it up unchanged; a paid Pro term bought during the pass stacks after it. Data dumps are not included.
  • CoinPay callback grants it after the account is resolved by sub (login and Settings connect). Never by email. A grant failure never blocks sign-in.
  • coinpay-onboard 0.3.1 -> ^0.5.0 (finishSignIn returns pass).
  • /premium: one line linking https://coinpayportal.com/pass.
  • No migration needed (grant_ref from 0040).

Tests: two new cases in apps/web/src/routes/coinpay.test.js (full callback on PGlite): active pass -> one Pro row until expiry across repeat sign-ins; inactive/expired/no-expiry -> nothing. bun run lint + bun test green (2682 pass).

🤖 Generated with Claude Code

CoinPay userinfo carries a `pass` claim (coinpay-onboard 0.5.0 finishSignIn
returns it parsed). On CoinPay sign-in an active pass becomes a free Pro term
from now until pass.expires_at: a memberships row (plan pro, price 0,
grant_ref coinpay-pass:<sub>:<expires_at>), idempotent on the
(user_id, grant_ref) index. isProUser already reads it, and a paid Pro term
bought during the pass stacks after it. Bound to the CoinPay sub only.

/premium gets one line pointing at https://coinpayportal.com/pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​profullstack/​coinpay-onboard@​0.3.1 ⏵ 0.5.080 +4100100 +194 +2100

View full report

@ralyodio
ralyodio merged commit 2037361 into main Nov 7, 2026
3 checks passed
@ralyodio
ralyodio deleted the feat/coinpay-pass branch November 7, 2026 16:18
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.

1 participant