diff --git a/internal/api/oidc/token_client_credentials.go b/internal/api/oidc/token_client_credentials.go index 4b3bf20acd..5d19e398a6 100644 --- a/internal/api/oidc/token_client_credentials.go +++ b/internal/api/oidc/token_client_credentials.go @@ -46,6 +46,9 @@ func (s *Server) ClientCredentialsExchange(ctx context.Context, r *op.ClientRequ nil, false, ) + if err != nil { + return nil, err + } return response(s.accessTokenResponseFromSession(ctx, client, session, "", "", false, true, false, false)) } diff --git a/internal/api/oidc/token_jwt_profile.go b/internal/api/oidc/token_jwt_profile.go index fc0c31a6eb..399fa5302e 100644 --- a/internal/api/oidc/token_jwt_profile.go +++ b/internal/api/oidc/token_jwt_profile.go @@ -54,6 +54,9 @@ func (s *Server) JWTProfile(ctx context.Context, r *op.Request[oidc.JWTProfileGr nil, false, ) + if err != nil { + return nil, err + } return response(s.accessTokenResponseFromSession(ctx, client, session, "", "", false, true, false, false)) }