JWT Functions
Create, decode, and verify JSON Web Tokens.
Decode
Decode a JWT without verifying the signature. Useful for reading token claims.
| Input | Output |
|---|---|
| token | header (json), payload (json) |
Sign
Create and sign a new JWT.
| Input | Type | Description |
|---|---|---|
| key | string | Signing key (secret or private key) |
| audience | string | Token audience (aud claim) |
| issuer | string | Token issuer (iss claim) |
| expiresIn | number | Seconds until expiration |
| jwtid | string | Unique token ID (jti claim) |
| noTimestamp | boolean | Skip iat claim |
| header | json | Custom header fields |
| notBefore | number | Seconds before token is valid |
| subject | string | Token subject (sub claim) |
| algorithm | enum | HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512 |
Output: token (string)
Verify
Verify a JWT signature and decode its contents.
| Input | Type | Description |
|---|---|---|
| token | string | The JWT to verify |
| key | string | Public key or shared secret (leave empty for auto-JWKS) |
| algorithm | enum | Expected algorithm (auto-detected from token if empty) |
| audience | string | Expected audience |
| issuer | string | Expected issuer |
| ignoreExpiration | boolean | Skip expiration check |
| subject | string | Expected subject |
Outputs: header (json), payload (json), valid (boolean)
Example: OAuth Token Flow
OAuth Token Flow
Get token from Auth0, extract and verify JWT
API Connector
Post
URL
https://auth0.com/oauth/token
Body
{"grant_type":"client_credentials"}
Body
Object
Get
object
Body
path
access_token
output
JWT
Verify
token
output
payload
valid
Auto-JWKS
If key is empty, Fainflow automatically fetches the public key from the token issuer's /.well-known/jwks.json endpoint. This works out of the box with Auth0, Okta, and other OIDC providers.
Supported algorithms: HS256/384/512 (HMAC), RS256/384/512 (RSA), ES256/384/512 (ECDSA).