jsonwebtoken / jsonwebtoken.github.io

jwt.io
Other
488 stars 321 forks source link

ES256 signature not valid #606

Open m3co-code opened 2 years ago

m3co-code commented 2 years ago

Thanks for jwt.io, it's great!

I'm struggling getting the online ES256 validation working. I've generated new keys with those commands:

openssl ecparam -genkey -name prime256v1 -noout -out jwt-root.pem
openssl ec -in jwt-root.pem -pubout -out jwt-pub.pem

The freshly generated keys look like this:

-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIC+BLC97UJGWACKjo7VuhgLadfTHDUg57gB2Ye3sotBDoAoGCCqGSM49
AwEHoUQDQgAEQ4KnTJ36kQ9hoKkWCr5N6FqsfztGdTnBLMHya6A2PUEBurjU5jdb
PDzLdOqLlw8y0Nt0OxEBg0hteRDXHT8sag==
-----END EC PRIVATE KEY-----
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQ4KnTJ36kQ9hoKkWCr5N6FqsfztG
dTnBLMHya6A2PUEBurjU5jdbPDzLdOqLlw8y0Nt0OxEBg0hteRDXHT8sag==
-----END PUBLIC KEY-----

If I input those keys on jwt.io I get "Invalid Signature". Is this a bug on jwt.io or am I doing something wrong? Thanks already!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

m3co-code commented 1 year ago

Ping

mzauliczny-evo commented 1 year ago

Hi! I recently encountered similar problem and it turned out to be an issue with Node.js version. It works with node >=16, however fails in Node14. I believe this app might be running in node 14 (as it specifies this version in .github/workflows/test.yml ).

DanOnCall commented 2 months ago

Hello, all. I am one of the newly appointed maintainers for jwt.io and I am working on a new version of the site. I apologize for the lack of response. I'll ensure that we test for this in the next version.

DanOnCall commented 2 months ago

cc @byron-okta

apncesn commented 2 months ago

same problem for others algorithms