| Feature | Description |
|---|---|
| Setup Time | 5 minutes |
| Backend Required | ✅ Yes (to create sessions) |
| Stays on Your Domain | ❌ No (redirects to verify.didit.me or your whitelabel custom domain) |
| Cross-Device Support | ✅ Yes |
| Browser Compatibility | ✅ All browsers |
When to Use Redirect
- Cross-device verification: Start on desktop, complete on mobile
- Maximum compatibility: Works in all browsers, including older ones
- Simple integration: No iframe configuration needed
- Camera issues: When iframe camera access is problematic
Implementation
Step 1: Create a Session (Backend)
Step 2: Redirect the User (Frontend)
HTML:Handling the Callback
When verification completes, Didit redirects to your callback URL with query parameters:| Parameter | Description |
|---|---|
verificationSessionId | Unique session identifier |
status | Approved, Declined, or In Review |
Next.js Example
Express.js Example
Vue Router Example
Open in New Tab
If you prefer to keep your app open while the user verifies:Security Best Practices
Verify the Callback
Always verify the callback data with your backend:Use Webhooks
For the most reliable integration, use webhooks to receive verification results directly to your backend, regardless of how the user’s browser behaves.Cross-Device Flow
The redirect method naturally supports cross-device verification:- User clicks “Verify” on desktop
- User is redirected to verification page
- If needed, user can scan QR code to continue on mobile
- After completion, both devices receive the result
- User is redirected to your callback URL
Troubleshooting
Callback Not Received
- Verify the callback URL is correctly set when creating the session
- Ensure your callback URL is accessible from the internet
- Check that the URL doesn’t have typos or encoding issues
Status Always “Declined”
- Check your workflow settings in the Didit Console
- Verify the test documents you’re using are valid
- Review the session details via API for specific decline reasons
Redirect Loop
- Ensure your callback handler doesn’t redirect back to verification
- Check for caching issues on your callback page
- Clear browser cache and try again
Example Repository
GitHub Repository
View source code and examples on GitHub