🐛 Fix auth context middleware force provide token

This commit is contained in:
2024-10-27 00:14:42 +08:00
parent 421834ae5c
commit 999cc2bcd8
3 changed files with 7 additions and 2 deletions

View File

@ -6,6 +6,10 @@ import (
func ContextMiddleware(c *fiber.Ctx) error {
atk := tokenExtract(c)
if len(atk) == 0 {
return c.Next()
}
c.Locals("nex_in_token", atk)
if claims, err := tokenRead(atk); err == nil && claims != nil {