Skip to content

Commit

Permalink
Add: log when failing oauth token verif (#8739)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraggle authored Nov 19, 2024
1 parent 14184ca commit 29e15ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions front/lib/api/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export function withPublicAPIAuthentication<T, U extends boolean>(
getRequiredScope(req, opts.requiredScopes)
);
if (decoded.isErr()) {
logger.error(decoded.error, "Failed to verify Auth0 token");
return apiError(req, res, {
status_code: 401,
api_error: {
Expand Down Expand Up @@ -383,6 +384,7 @@ export function withAuth0TokenAuthentication<T>(
getRequiredScope(req, opts.requiredScopes)
);
if (decoded.isErr()) {
logger.error(decoded.error, "Failed to verify Auth0 token");
return apiError(req, res, {
status_code: 401,
api_error: {
Expand Down

0 comments on commit 29e15ba

Please sign in to comment.