Skip to content

Commit

Permalink
better check if a token is a jwt (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed May 25, 2023
1 parent 2091b96 commit 770f9b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func PubKeyContext(next http.Handler) http.Handler {
return
}

isJwt := strings.Contains(token, ".")
isJwt := strings.Contains(token, ".") && !strings.HasPrefix(token, ".")

if isJwt {
claims, err := DecodeToken(token)
Expand Down

0 comments on commit 770f9b0

Please sign in to comment.