diff --git a/pkg/module/auth/jwt.go b/pkg/module/auth/jwt.go index 39f148a..34f0ca8 100644 --- a/pkg/module/auth/jwt.go +++ b/pkg/module/auth/jwt.go @@ -61,6 +61,10 @@ func FindToken(r *http.Request, getKeySet GetKeySetFunc) (jwt.Token, error) { return nil, errors.WithStack(err) } + if keySet == nil { + return nil, errors.New("no keyset") + } + token, err := jwt.Parse([]byte(rawToken), jwt.WithKeySet(keySet, jws.WithRequireKid(false)), jwt.WithValidate(true),