Skip to content

feat: add account email verification - #10

Merged
dataPro-lgtm merged 2 commits into
mainfrom
feature/m5-email-verification
Aug 3, 2026
Merged

dataPro-lgtm merged 2 commits into
mainfrom
feature/m5-email-verification

Conversation

@dataPro-lgtm

Copy link
Copy Markdown
Owner

Summary

Stacked on #7 (shares the transactional auth email channel). Merge #7 first; this PR then retargets to main.

  • 0040 migration: users.email_verified_at plus digest-stored single-use verification tokens
  • Registration issues a verification token and sends a best-effort email; POST /v1/auth/email/verify consumes it exactly once; POST /v1/auth/email/resend is authed, rate-limited, and idempotent for already-verified accounts
  • UserProfile exposes emailVerifiedAt across mock and PostgreSQL repositories
  • Web verify-email page with auto-verify, resend, and login hand-off
  • OpenAPI contract entries and 5 new mock-repository tests

Verification is recorded but not yet gating any features — gating is a deliberate later policy step once verification rates are known.

Test plan

  • pnpm --filter @sg/api test — 129 passed (5 new in emailVerification.test.ts)
  • 0040 migration should be exercised by the PostgreSQL integration job in CI

🤖 Generated with Claude Code

- 0040 migration: users.email_verified_at plus digest-stored single-use tokens
- Registration issues a verification token and best-effort email; /v1/auth/email/verify
  consumes it once, /v1/auth/email/resend is authed, rate-limited, and idempotent
- UserProfile exposes emailVerifiedAt across mock and PostgreSQL repositories
- Web verify-email page with auto-verify, resend, and login hand-off
- OpenAPI contract entries and five mock-repository tests

Stacked on feature/m5-password-reset (shares the transactional auth email channel).
Verification is recorded but not yet gating any features; gating is a later policy step.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dataPro-lgtm
dataPro-lgtm changed the base branch from feature/m5-password-reset to main August 3, 2026 13:00
@dataPro-lgtm dataPro-lgtm reopened this Aug 3, 2026
@dataPro-lgtm dataPro-lgtm reopened this Aug 3, 2026
@dataPro-lgtm
dataPro-lgtm merged commit aaeeb62 into main Aug 3, 2026
11 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