Skip to content

Commit

Permalink
Added explicit algorithm to verifySignature
Browse files Browse the repository at this point in the history
  • Loading branch information
Ymirke authored Feb 2, 2024
1 parent 95ff7ce commit e8d4973
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/jwt/lib/verifySignature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export const verifySignature = (
}

try {
verify(jwt, privateKey);
verify(jwt, privateKey, {
algorithms: ['HS256'],
});
return true;
} catch (error) {
log('Error when verifying token', error);
Expand Down

0 comments on commit e8d4973

Please sign in to comment.