Backend Verification
Server-side proof verification patterns and best practices
Overview
Backend verification is the process of cryptographically validating proofs received from the Reclaim Protocol after users complete verification. This ensures the authenticity and integrity of the verified data before using it in your application.
Why Backend Verification is Critical
Always verify proofs on your backend before trusting the data. Client-side verification alone can be bypassed, but cryptographic verification on your server ensures authenticity.
Quick Start
For complete backend verification implementations, see:
- Node.js / Express Setup → - Complete backend with Express.js
- Next.js Setup → - API routes and verification
- Python Setup → - FastAPI and Django examples
Verification Process
1. Receive Proof
Proofs are sent to your callback URL as URL-encoded JSON:
2. Verify Proof
Use the verifyProof() function to cryptographically verify:
3. Extract Data
Once verified, extract the data you need:
Complete Example (Node.js)
Complete Example (Python)
Proof Structure
Understanding the proof object structure:
Security Best Practices
Critical Security Requirements
- Always verify on backend - Never trust client-side verification alone
- Validate proof structure - Check all required fields exist
- Store proofs securely - Use encrypted database storage
- Check timestamps - Reject old proofs (set expiration time)
- Rate limit callbacks - Prevent spam/DOS attacks
- Use HTTPS - Secure data in transit
Timestamp Validation
Proof Deduplication
Database Integration
Save Verified Proofs
Error Handling
Testing
Manual Testing
Automated Testing
Next Steps
For complete implementation examples:
- Node.js Setup → - Full Express.js backend
- Next.js Setup → - API routes implementation
- Python Setup → - FastAPI/Django examples
- API Reference → - Complete SDK documentation
- Troubleshooting → - Common issues