Skip to content

Add invite code registration#33

Merged
JeremiahM37 merged 1 commit intomainfrom
feature/invite-registration
Apr 27, 2026
Merged

Add invite code registration#33
JeremiahM37 merged 1 commit intomainfrom
feature/invite-registration

Conversation

@JeremiahM37
Copy link
Copy Markdown
Owner

New users can self-register using an invite code without needing an admin to be logged in. Admins generate codes via POST /api/invites with configurable role, max uses, and expiry. Registration form now always visible with an invite code field. First user still becomes admin with no code needed.

New users can register without admin being logged in by using an invite
code. Admins generate invite codes via the API with configurable role,
max uses, and expiry. First user still becomes admin with no code needed.

Backend:
- invite_codes table (code, role, max_uses, uses, expires_at)
- POST /api/register accepts optional invite_code field
- GET/POST/DELETE /api/invites for admin management
- Codes are 32-char hex (crypto/rand), single-use by default

Frontend:
- Invite code field on the registration form
- Register link always visible (not just for first user)
- Invite field hidden for first-user setup
@JeremiahM37 JeremiahM37 merged commit 925d4c5 into main Apr 27, 2026
2 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