feat(auth): 登录注册 - 添加短信通知与组合验证支持

This commit is contained in:
ddCat committed 2026-09-22 23:46:15 +08:00
1 parent 6c013ebf7e
commit bc0d109428
55 files changed
+4013 -103

No files matched your search

+8
View File
@@ -51,8 +51,16 @@ type Service struct {
mailSender func(EmailSettingValue, string, string, string) error
emailCodeMu sync.Mutex
registrationMu sync.Mutex
sms SMSDelivery
}
type SMSDelivery interface {
Available(string) (bool, error)
SendCode(context.Context, string, string, string) error
}
func (s *Service) SetSMSDelivery(delivery SMSDelivery) { s.sms = delivery }
func New(repo *repository.Repository, host Host, mailSender func(EmailSettingValue, string, string, string) error) *Service {
if host == nil {
host = nopHost{}