Replies: 1 comment 1 reply
-
|
Your private key fails to meet requirements to be used for the ES256 algorithm. It would need to be an EC private key using the NIST P-256 curve. Otherwise the code is right. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While the documentation is extensive it seems to be missing the basics and I am going in circles. My needs are simple, just need to sign a JWT. I have used jsonwebtoken for years but really like the broad coverage and ZERO dependencies of panva/jose.
My latest attempt, copied from various bits of documentation, is:
Which fails with "invalid key type or asymmetric key type for this operation"
FWIW the .pem is an existing one that is used to run a local dev server for the same project. I suspect it may not be correct for this code but scratching my head trying to figure out what would be correct.
Beta Was this translation helpful? Give feedback.
All reactions