fix(dimentorin): verify-email validates OTP before activating user

- new app_otp_cache table + OtpCache entity (ResourceEnum::OtpCache)
- PostgresOtpRepository upsert/find/delete keyed by email
- register/resend persist otp_hash+expiry after email sent (no orphan OTP)
- verify_email validates via OtpManager::validate_otp_hash, single-use delete
- 8 unit tests pass, e2e verified: wrong OTP 400, correct OTP 200
This commit is contained in:
asepharyana
2026-08-04 23:35:34 +07:00
parent 3692b81324
commit c6ed5c5c19
12 changed files with 240 additions and 18 deletions
@@ -1,2 +1,4 @@
pub mod http;
pub mod persistence;
pub use persistence::postgres_otp_repository::PostgresOtpRepository;