Skip to content

Commit

Permalink
improve: print parser error
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed May 18, 2024
1 parent 3c279ff commit 6158b2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/middlewares/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ func Auth() gin.HandlerFunc {
if err != nil {
log.Fatalln("create GeniusAuth jwt parser failed:", err)
}
parser.OnError = func(err error) {
log.Errorln("token parser error:", err)
}

return func(c *gin.Context) {
if strings.HasPrefix(c.Request.URL.Path, "/login/") {
Expand Down

0 comments on commit 6158b2e

Please sign in to comment.