feat: sync configurable OTP delivery providers
This commit is contained in:
parent
c18f773701
commit
6af61f26ba
28 changed files with 2100 additions and 118 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
const (
|
||||
PhoneCodePurposeChangePhone = "change_phone"
|
||||
PhoneCodeChannelPhone = "phone"
|
||||
PhoneCodeChannelSMS = "sms"
|
||||
PhoneCodeChannelEmailLogin = "email_login"
|
||||
PhoneCodeChannelEmailSetupRequired = "email_setup_required"
|
||||
)
|
||||
|
|
@ -34,8 +35,12 @@ type PhoneCode struct {
|
|||
SignUpVerified bool
|
||||
Phone string
|
||||
Code string
|
||||
Channel string
|
||||
Purpose string
|
||||
// DeliveryID is the stable, opaque idempotency key used for the outbound
|
||||
// provider call that carries this code. It contains no recipient or secret
|
||||
// material and is rotated whenever a genuinely new code is issued.
|
||||
DeliveryID string
|
||||
Channel string
|
||||
Purpose string
|
||||
// UserID is also encoded as a string because scoped verification mutates the
|
||||
// record in Redis Lua and must not round an int64 owner through cjson.
|
||||
UserID int64 `json:",string"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue