Incorrect invalid algorithm error
See original GitHub issuethis works:
require('jsonwebtoken').verify('eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.TCYt5XsITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUcX16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtjPAYuNzVBAh4vGHSrQyHUdBBPM', `-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdlatRjRjogo3WojgGHFHYLugd
UWAY9iR3fy4arWNA1KoS8kVw33cJibXr8bvwUAUparCwlvdbH6dvEOfou0/gCFQs
HUfQrSDv+MuSUMAe8jzKE4qW+jK+xQU9a03GUnKHkkle+Q0pX/g6jXZ7r1/xAK5D
o2kQ+X5xK9cipRgEKwIDAQAB
-----END PUBLIC KEY-----`)
(example from jwt.io)
This gives invalid algorithm instead of complaining about the key:
require('jsonwebtoken').verify('eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.TCYt5XsITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUcX16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtjPAYuNzVBAh4vGHSrQyHUdBBPM', `a`)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
node.js - UnauthorizedError: invalid algorithm express-jwt
I am displaying some data on my website which returns from node server. It's works perfectly until today. Now I am getting below...
Read more >Invalid Algorithm Error - Auth0 Community
I am using graphql. I am taking the accessToken and sending it as header to the backend to verify the request. On the...
Read more >VerifyJWT policy deployment error troubleshooting
For example, in the following error message, the name of Verify JWT policy is JWT-Verify-RS256 and the element name is Algorithm : Invalid...
Read more >Failed to generate XML signature. Invalid algorithm specified
The most likely cause is that the wrong cryptographic provider is associated with the private key. The following topic describes how to confirm...
Read more >Error Handling — Ultrasonic Sensing Design Center User ...
Full Application Error List¶ ; 27, Invalid algorithm option ; 28, Envelope Crossing Threshold outside supported range ; 29, Start PPG Count outside...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did you notice that
jwt.verify(token, cert, { algorithms: ['RS256']})
? It’salgorithms
, notalgorithm
.Thanks, this was really helpful.