Skip to content

Commit

Permalink
Add block with the user info without technical data
Browse files Browse the repository at this point in the history
  • Loading branch information
stekycz committed Aug 7, 2024
1 parent b532071 commit 1c84e6c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ async function callback(req, res, next) {
<legend>Decoded ID Token</legend>
<pre>${decodedTokenPretty}</pre>
</fieldset>
<br/>
<fieldset>
<legend>The user info</legend>
<ul>
${tokenSet.scope.includes('user_id') ? `<li><strong>User ID:</strong> <pre>${decodedToken.user_id}</pre></li>` : ''}
${tokenSet.scope.includes('name') ? `<li><strong>Full Name:</strong> <pre>${decodedToken.name}</pre></li>` : ''}
${tokenSet.scope.includes('email') ? `<li><strong>Email:</strong> <pre>${decodedToken.email}</pre></li>` : ''}
</ul>
</fieldset>
`);
} catch (err) {
next(err);
Expand Down

0 comments on commit 1c84e6c

Please sign in to comment.