Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

You are using an asymetric signing method (ES256, which is based on ECDSA), but you are supplying a symmetric key ([]byte). You either need to use a symmetric signing method, such as HMAC or provide a *ecdsa.PrivateKey for ES256.

You can find more about this in our new project page (which is still under construction): https://golang-jwt.github.io/jwt/usage/create/ and https://golang-jwt.github.io/jwt/usage/signing_methods/#signing-methods-and-key-types

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by oxisto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #305 on April 11, 2023 09:04.