How to create JWKS from PEM format

How to create a JWKS from the PEM format needed for JWKS Endpoint in Web3Auth's Dashboard? This is needed when creating a custom verifier.



Originally posted by: shahbaz17

Most of the login providers that support JWT-based login will provide you this URL, such as Firebase, Google, GitHub, Auth0 etc.

But if you're using jose or jsonwebtoken package to generate a JWT token for login.

Then here's the step to do so:

  1. Create a Private Key using openssl. openssl genrsa -out privateKey.pem 512: This privateKey will be used to sign the token.

  2. Using the above privateKey.pem file, create a Public Key. openssl rsa -in privateKey.pem -pubout -out publicKey.pem: This publicKey.pem will be converted to JWKS.

  3. Now, look for a tool that converts .pem to jwk(s) format.

  4. Now, save the output in a .json file. This is your JWKS Endpoint, which you need to put on the Web3Auth Dashboard.



Originally posted by: shahbaz17

Please have a look at our guide around this: https://web3auth.io/docs/auth-provider-setup/byo-jwt-providers#how-to-convert-pem-to-jwks

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.