From 29e15ba989ed84ff6c64c344fc779883117e3b75 Mon Sep 17 00:00:00 2001 From: Sebastien Flory Date: Tue, 19 Nov 2024 13:31:17 +0100 Subject: [PATCH] Add: log when failing oauth token verif (#8739) --- front/lib/api/wrappers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/front/lib/api/wrappers.ts b/front/lib/api/wrappers.ts index e28e96ce9a1d..1dec01d6d2f1 100644 --- a/front/lib/api/wrappers.ts +++ b/front/lib/api/wrappers.ts @@ -212,6 +212,7 @@ export function withPublicAPIAuthentication( 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: { @@ -383,6 +384,7 @@ export function withAuth0TokenAuthentication( 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: {