Verify email on registration (double opt-in) — stop unverified/bot signups #31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today
/v1/registercreates a usable account immediately with no email verification. Two problems: (1) bots can mass-create accounts (as just happened on Forgejo), and (2) anyone could registerwhoever@swisscairn.chwithout owning the mailbox — which matters because the admin dashboard (license-server dashboard issue) may key admin access off that domain.Proposal — double opt-in
/v1/register: create the account in an unverified state, generate a single-use, time-limited verification token (memory or a short-lived DB row), email a confirm link (reuse the existing SMTP path fromemail.go/ reset flow).GET/POST /v1/verify?token=…marks the account verified.Interaction with admin auth
If admin access is domain-based (
@swisscairn.ch), it MUST additionally require the account be verified (or authenticated via Google OAuth, which already proves the mailbox). An explicit allowlist of admin emails sidesteps this, but verification is still the right default for all accounts.Notes