Conversation
This is a code example in node.js 12, implementing id token verification using the jose library. Please review and include with your examples.
|
@joshua-at-aws, can you please review this PR? |
| try { | ||
| const token = await extractToken(event); | ||
| keyStore = await getPublicKeysIfNotCached(keyStore); | ||
| const decryptedToken = await verifyIdToken(token, keyStore, cognitoIssuer, cognitoClientId); |
There was a problem hiding this comment.
Hello!
You have decryptedToken redefined here. const should be removed, to unblock the initial definition on line 62.
Per comment from code review: removed redefining the variable.
|
@naphtul can I recommend that the handler be passed the token directly, reason being that using WebSockets on APIGateWayV2 only has the option of passing tokens using query parameters. Headers are unsupported :( |
@kevelbreh |
Description of changes:
This is a code example in node.js 12, implementing id token verification using the jose library.
Please review and include with your examples.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.