authenticate
Validates a JWT token and authenticates the user against database records. This action combines token verification with user lookup in a single step.Integration ID
The database integration to look up user records.Token
The JWT token to validate. Typically extracted from the Authorization header.JWT Key
The secret key used to verify the JWT signature.Database Field
The field name in the database to match against the token’s subject claim.Collection
The database collection or table name containing user records.Fail On Auth Error
Whether authentication failures should route to thefail step.
Example
{{ .auth_user }}.
jwt
Creates and validates JSON Web Tokens. Useencode mode to generate tokens for authentication, or decode mode to verify and extract claims from existing tokens.
Mode
The operation mode:encode to create a token, or decode to verify and extract claims.
Allowed values:
encode, decode
Field
Forencode mode: the subject value to include in the token (typically a user ID).
For decode mode: the JWT token string to verify.
Key
The secret key for signing (encode) or verifying (decode) the token.
Required unless using
jwksURL for verification.
JWKS URL
URL to fetch a JSON Web Key Set for token verification. Used for validating tokens from OAuth providers.Claims
Additional claims to include in the token when encoding.
Common claims include
role, iss (issuer), exp (expiration), and aud (audience).
Fail On Validation Error
Whether token validation failures should route to thefail step.
Encode Example
Generate a JWT token after user login:Decode Example
Verify a token and extract its claims:{{ .verify_token }}.
Decode with JWKS Example
Verify tokens from an OAuth provider:hash
Generates cryptographic hashes for secure password storage. Currently supports bcrypt, which is recommended for password hashing.Value
The value to hash, typically a password.Algorithm
The hashing algorithm to use.
Supported algorithms:
bcrypt
Example
Hash a password before storing it:Common Patterns
User Registration Flow
Complete user registration with password hashing and token generation:Protected Endpoint
Authenticate requests before processing:Next Steps
Secrets Management
Securely store JWT secrets and API keys.
Data Operations
Store and retrieve user data from databases.
HTTP Requests
Call external authentication services.
Actions Overview
Learn the fundamentals of ServFlow actions.