Skip to content

Commit

Permalink
debug orcid flow issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kadamidev committed Dec 24, 2024
1 parent 8c2df74 commit d4b1154
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion desci-server/src/controllers/auth/magic.ts
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit d4b1154

Please sign in to comment.