Skip to content

Add user invitation system with token-based signup - #25

Merged
jasoncrawford merged 3 commits into
mainfrom
user-invitations
Feb 18, 2026
Merged

jasoncrawford merged 3 commits into
mainfrom
user-invitations

Conversation

@jasoncrawford

Copy link
Copy Markdown
Collaborator

Summary

  • Server actions for sending invitations (generates token, sends email via Resend) and revoking
  • Accept invitation page at /invite/[token] with password form
  • Creates user account via Supabase admin API on invitation acceptance
  • Handles invalid/used tokens and already-registered emails gracefully
  • 9 new tests covering auth enforcement, invitation creation, email sending, acceptance, and error cases

Closes #12

Test plan

  • sendInvitation creates token record and sends email
  • revokeInvitation deletes the invitation
  • acceptInvitation validates password length
  • acceptInvitation rejects invalid/used tokens
  • acceptInvitation creates user and marks invitation accepted
  • acceptInvitation handles already-registered emails
  • Unauthenticated users redirected to login for send/revoke
  • All 60 tests pass, build succeeds

Server actions for sending and revoking invitations from settings.
Invitation emails sent via Resend with unique token links.
Accept invitation page at /invite/[token] validates token,
creates user account via Supabase admin API, marks invitation accepted.
Handles invalid/used tokens and already-registered emails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit a866272 into main Feb 18, 2026
1 check passed
jasoncrawford added a commit that referenced this pull request Feb 23, 2026
The invitation backend (server actions, DB, email) was added in PR #25
but the settings page UI to send/manage invitations was never wired up.
Adds the Invitations card and E2E tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Implement user invitation system

1 participant