From d4b11542f86b5e6c2d75129a495432c5f3551878 Mon Sep 17 00:00:00 2001 From: kadami <86646883+kadamidev@users.noreply.github.com> Date: Tue, 24 Dec 2024 11:46:12 +0000 Subject: [PATCH] debug orcid flow issues --- desci-server/src/controllers/auth/magic.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/desci-server/src/controllers/auth/magic.ts b/desci-server/src/controllers/auth/magic.ts index 863240e9..791369a8 100644 --- a/desci-server/src/controllers/auth/magic.ts +++ b/desci-server/src/controllers/auth/magic.ts @@ -94,7 +94,18 @@ export const magic = async (req: Request, res: Response, next: NextFunction) => if (!user) throw new Error('User not found'); if (orcid && user) { - logger.trace({ orcid }, `setting orcid for user`); + logger.trace( + { + orcid, + accessTokenLength: access_token?.length, + accessTokenPresent: !!access_token, + refreshTokenLength: refresh_token?.length, + refreshTokenPresent: !!refresh_token, + orcidAccessExpiry: expires_in, + }, + + `setting orcid for user`, + ); if (!user.name) { const orcidRecord = await getOrcidRecord(orcid, access_token);