JWT
Last updated
Was this helpful?
Last updated
Was this helpful?
The Jwt
node can be used to encrypt an object to JSON web token or similarly to decrypt one to an object.
Case: SIGN
Source: Receives an Object
with the values to encrypt. Learn more on .
Case: VERIFY
Source: Receives the JSON web token as String
. Learn more on .
Environment variables:
jwt: Requires JWT PRIVATE KEY to be set.
Case: SIGN
Out: Returns a String
with the encrypted JWT. Learn more on .
Case: VERIFY
Out: Returns a Boolean
true if the token is valid and false if it's invalid. Learn more on .
Register a user to a database.
Request (Post) ➡ Jwt (Sign) ➡ Database (Add) ➡ Response (200)
Return a user's profile.
Request (Get) ➡ Jwt (verify) ➡ Database (Get) ➡ Response (200)