Custom
Using your own Custom Authentication
You can use your existing userbase or authentication method with Particle Auth. This way, your users can still log in with their existing accounts. If you need to use this function, please contact us.
Most of the login providers that support JWT-based login will provide you this URL, such as Firebase, Google, GitHub, Auth0 etc.
We only support RS256 by now.
But if you're using
jose
or jsonwebtoken
package to generate a JWT token for login.Libraries:
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
: ThispublicKey.pem
will be converted to JWKS. - 3.Now, look for a tool that converts
.pem
tojwk(s)
format.- Select Public Key Use:
Signing
- Algorithm:
RS256
- Key ID:
alpha-numeric-random-string
- PEM encoded key:
{paste-the-publicKey-pem-file-content-here
- Click on
Convert
button.
- 4.Now, save the output in a
.json
file, and it. This is your JWKS Endpoint, which you need to send to Particle Team to config.
Last modified 1mo ago