feat: portal auth login and password reset
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
func shouldSkipUserJWTAuth(path string, method string) bool {
|
||||
func shouldSkipUserJWTAuth(path, method string) bool {
|
||||
// 仅对明确的公开接口放行,避免误伤其它路径。
|
||||
if method != fiber.MethodPost {
|
||||
return false
|
||||
@@ -18,7 +18,7 @@ func shouldSkipUserJWTAuth(path string, method string) bool {
|
||||
|
||||
p := strings.TrimSuffix(path, "/")
|
||||
switch p {
|
||||
case "/v1/auth/login", "/v1/auth/register":
|
||||
case "/v1/auth/login", "/v1/auth/register", "/v1/auth/password/reset/sms", "/v1/auth/password/reset/verify", "/v1/auth/password/reset":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user