fix(auth): 固定验证码改为显式 AUTH_EMAIL_DEV_CODE 环境开关(安全评审反馈)
不再从 mailer 运行时类型推导认证材料:固定码仅当显式设置 AUTH_EMAIL_DEV_CODE 时生效(run-dev.sh 设 888888,生产部署不经 该脚本即为随机码),设置时启动打印醒目告警。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,8 @@ type Handlers struct {
|
||||
JWT *JWT
|
||||
Wechat WechatClient
|
||||
Mailer Mailer
|
||||
// DevCode 非空时邮箱验证码固定为该值(AUTH_EMAIL_DEV_CODE,仅开发脚本设置)。
|
||||
DevCode string
|
||||
// QrAuthURL 二维码内容模板(真实环境为微信开放平台授权页,%s 为 state)
|
||||
QrAuthURL string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user