diff --git a/api/middleware/middleware.go b/api/middleware/middleware.go index b481326..df87d90 100644 --- a/api/middleware/middleware.go +++ b/api/middleware/middleware.go @@ -129,9 +129,7 @@ func AuthMiddleware(options AuthMiddlewareOptions) func(http.Handler) http.Handl aud, _ := claim.GetAudience() if options.Purpose != account.JWTPurposeNone && slices.Contains[jwt.ClaimStrings, string](aud, string(options.Purpose)) == false { - if !options.EmptyAllowed { - return account.ErrJWTInvalid - } + return account.ErrJWTInvalid } return nil