How to generate JWT using JWT.io

3.5k views Asked by At

I have private key (not RSA) and i want to generate JWT using <jwt.io> using RS256. How can I generate a token?

Whenever I enter my private key it says invalid signature. If I need to pass RSA private key then how to convert my private key to RSA private key? I am totally new to this.

1

There are 1 answers

0
jps On

RS256 is an asymmetric signature algorithm, that means you need a keypair consisting of private and public key. You can generate such a pair with various online tools or with openssl. To generate (i.e sign) a token, you need the private key. But for verification, you need the public key. As long as you only paste the private key into the field in the right column, JWT.io can sign a token, but can't verify it. Therefore paste both keys of the pair into the key fields to get your token signed and verified.