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
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.
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:
Create a Private Key using openssl. openssl genrsa -out privateKey.pem 512
: This privateKey will be used to sign the token.
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.
Now, look for a tool that converts .pem
to jwk(s)
format.
RS256
Signing
alpha-numeric-random-string
or leave blank to generate a random one.{paste-the-publicKey-pem-file-content-here
Convert to JWK
button.Now, save the output in a .json
file. This is your JWKS Endpoint, which you need to put on the Web3Auth Dashboard.
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.