Skip to content

feat: add secure self-service email change workflow - #45

Merged
jmgasper merged 1 commit into
developfrom
change_email
Aug 31, 2026
Merged

feat: add secure self-service email change workflow#45
jmgasper merged 1 commit into
developfrom
change_email

Conversation

@jmgasper

@jmgasper jmgasper commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add self-or-admin endpoints to send and verify an OTP at the current primary email.
  • Send a one-time validation link only to the proposed new email and defer all database changes until that link is validated.
  • Reuse the existing primary-email update service for the final identity/member database update and user event.
  • Bind each step to the verified current address, cap OTP attempts, rate-limit resends, and keep OTP/proof/pending state short-lived in shared cache.
  • Document the new endpoints and environment settings.

Platform dependency

Testing

  • pnpm lint
  • pnpm build
  • pnpm exec jest src/api/user/email-change.service.spec.ts --runInBand (4 tests)

Notes

  • This repository uses develop as its integration branch; there is no dev branch.

@jmgasper
jmgasper merged commit bb7ebd3 into develop Aug 31, 2026
5 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