Skip to content

Commit

Permalink
Merge pull request #737 from desci-labs/signin-dbg
Browse files Browse the repository at this point in the history
ORCID Flow debugging
  • Loading branch information
kadamidev authored Dec 24, 2024
2 parents 27af6cf + d4b1154 commit 2a05ddb
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
Expand Up @@ -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);
Expand Down

0 comments on commit 2a05ddb

Please sign in to comment.