Routes:
POST /users/456/verification
called by frontend to create verification & redirect to verification process
GET /users/456/verification
returns status of your verification
POST /webhooks/verifications/:id
called by 3rd party
Table
verifications
---
id
user_id int
status string
url string # URL where user should be redirected
... # any other columns to store results or identify webhook
- User clicks "Verify"
- Application makes a call to
/users/456/verification
- Verification record is created in database with status pending
- User is redirectd for verification process
- User has finished
- I get a callback from 3rd party and update my Verification record