Skip to content

Remove invite code system — open signup#30

Merged
xaelophone merged 1 commit into
mainfrom
remove/invite-code-system
Feb 26, 2026
Merged

Remove invite code system — open signup#30
xaelophone merged 1 commit into
mainfrom
remove/invite-code-system

Conversation

@xaelophone

Copy link
Copy Markdown
Collaborator

Summary

  • Remove 3 server endpoints: validate-invite, use-invite, activate-trial — only POST /api/auth/signup remains (simplified to email + password)
  • Simplify signup page: Remove 3-step invite flow (invitesignupdone), now a single form with email/password + Google OAuth
  • Remove trial activation from AuthContext: No more pendingTrialDays sessionStorage handoff for Google OAuth
  • Update CLAUDE.md: Reflect open signup, remove all invite code documentation

The invite_codes table and DB functions are left in place (no migration needed — dropping is unnecessary risk).

Why this is safe

  • Email/password users get trial_expires_at stamped explicitly by the signup endpoint
  • Google OAuth users get trial_expires_at via the usage gate fallback (created_at + 7 days)
  • The global rate limit on /api/auth (10 req/min) still prevents abuse
  • admin.createUser() is server-side only — no client-side Supabase signup abuse
  • Existing users are unaffected (their trial_expires_at is already stamped)

Net change: 6 files changed, +25 −377

Test plan

  • Email/password signup → account created, auto-logged in, 7-day trial active
  • Google OAuth signup → account created, usage gate gives 7-day free period
  • After 7 days → FREE_EXPIRED response, prompted to upgrade
  • Existing users unaffected
  • npm run web:build passes
  • Server typecheck passes

🤖 Generated with Claude Code

Invite codes were unnecessary friction now that all free accounts have a
default 7-day limit (10 messages/day) with automatic expiry. A paying
customer was blocked by the invite code requirement.

Anyone can now sign up directly with email/password or Google OAuth.
The 7-day free tier + Pro upgrade is the new gating mechanism.

- Remove 3 server endpoints (validate-invite, use-invite, activate-trial)
- Simplify signup endpoint to just email + password (no invite code)
- Remove invite code step from SignupPage (single-step form)
- Remove trial activation logic from AuthContext
- Update CLAUDE.md to reflect open signup flow

The invite_codes table and DB functions are left in place (legacy, unused).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Feb 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hermes Ready Ready Preview, Comment Feb 26, 2026 7:42pm

Request Review

@xaelophone
xaelophone merged commit 5612860 into main Feb 26, 2026
8 checks passed
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