feat(auth): add MizbanSMS OTP provider with per-flow messages and signup recovery
- Add MizbanSMS as selectable SMS provider (SMS_PROVIDER), keep Kavenegar - Distinct OTP wording per flow via OtpMessageKind (register/login/change-phone) - register() resumes an unverified account instead of blocking re-registration - Hourly cleanup of abandoned unverified accounts (>24h) + expired OTP codes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,20 @@ export enum VerificationPurpose {
|
||||
CHANGE_PHONE = 'change_phone',
|
||||
}
|
||||
|
||||
/**
|
||||
* Which OTP wording to send. Registration and passwordless login share the
|
||||
* LOGIN verification purpose but want different message text, so the message
|
||||
* kind is tracked separately from the purpose.
|
||||
*/
|
||||
export enum OtpMessageKind {
|
||||
/** First-time signup / completing verification of an unverified account. */
|
||||
REGISTER = 'register',
|
||||
/** Passwordless one-time-password login for a verified account. */
|
||||
LOGIN = 'login',
|
||||
/** Confirming a new phone number from the account page. */
|
||||
CHANGE_PHONE = 'change_phone',
|
||||
}
|
||||
|
||||
export enum TicketDepartment {
|
||||
TECHNICAL = 'technical',
|
||||
SALES = 'sales',
|
||||
|
||||
Reference in New Issue
Block a user