Skip to content

Commit

Permalink
Fix: unexpected verification error
Browse files Browse the repository at this point in the history
because `expectedPublicKey` was never empty, even when it was supposed to be
  • Loading branch information
antonkatz authored Feb 24, 2023
1 parent 0f272c6 commit 9f68cf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tokenVerifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function getPublicKey(jwkKeyListUrl, kid) {
}
}

module.exports = async function(authressCustomDomain, requestToken, options = { expectedPublicKey: {}, verifierOptions: {} }) {
module.exports = async function(authressCustomDomain, requestToken, options = { expectedPublicKey: null, verifierOptions: {} }) {
if (!requestToken) {
const error = new Error('Unauthorized');
error.code = 'Unauthorized';
Expand Down

0 comments on commit 9f68cf6

Please sign in to comment.