完善登录逻辑,登录接口统一到 /token

This commit is contained in:
2025-04-23 19:01:08 +08:00
parent b181864a2f
commit 1374757eab
28 changed files with 404 additions and 266 deletions

View File

@@ -2,6 +2,7 @@ package handlers
import (
"errors"
"platform/web/auth"
"platform/web/services"
"regexp"
"strconv"
@@ -16,6 +17,13 @@ type VerifierReq struct {
func SmsCode(c *fiber.Ctx) error {
_, err := auth.Protect(c, []services.PayloadType{
services.PayloadClientConfidential,
}, []string{})
if err != nil {
return err
}
// 解析请求参数
req := new(VerifierReq)
if err := c.BodyParser(req); err != nil {