verify_sms, verify_email), you can define custom steps that your own backend handles — KYC review, biometric verification, document upload, or any other process. When a custom step is reached, your backend verifies the user and issues a signed token that Prelude validates to advance the challenge.
Make sure you are familiar with the Step-Up Authentication flow before reading this page.
Prerequisites
- A working step-up configuration
- An RSA key pair for signing verification tokens
- A public JWKS endpoint exposing your public keys
Setup
1. Register your custom step keys
Add your custom step keys and JWKS URL to the step-up configuration:a-z, A-Z, 0-9, and .-_:.
2. Expose a JWKS endpoint
Yourjwks_url must serve a standard RFC 7517 JSON Web Key Set containing the RSA public keys used to verify your verification tokens. Each key must include a kid (key ID).
3. Return custom steps from your hook
In your hook response, include your custom step keys alongside any managed steps:Completing a custom step
When the challenge reaches a custom step, the user completes it on your side (your UI, your backend logic). Once verified, your backend issues a verification token and the user sends it to Prelude to advance the challenge.1. Issue a verification token
Your backend creates an RS256 JWT signed with your private key:Token fields
Token requirements
Example (Node.js)
2. Advance the challenge
Once your backend issues the verification token, the frontend SDK advances the challenge:- Fetching your public keys from your JWKS endpoint
- Verifying the RS256 signature and expiration
- Checking that
sub,challenge_id, andkeymatch the challenge token - Checking the
jtihas not been used before