Fullstack Usage
This guide demonstrates how to integrate the Reclaim Protocol JavaScript SDK into a fullstack application securely. We'll cover both the backend and frontend implementations.
Video Walkthrough
Prerequisites
- Install the React libraries using the Installation guide
- Get the
APPLICATION_ID
,APPLICATION_SECRET
andPROVIDER_ID
using the API Key guide
1. Backend Implementation
For a detailed backend implementation using Node.js/Python , please refer to the Backend guide.
If you are deploying on localhost, be sure to use ngrok to make it visible on a public url.
This guide will assume the backend has been deployed.
2. Frontend Implementation
There are two ways to implement the Reclaim Protocol on your frontend.
- Using the
triggerReclaimFlow()
method (Recommended) - Using the
getRequestUrl()
method
Using the triggerReclaimFlow()
method (Recommended)
This method automatically detects the user's environment and chooses the best verification method for the user.
- Browser extension for desktop users (if installed)
- QR code popup for desktop users (if extension is not installed)
- AppClip/InstantApp redirection for mobile users
Using the getRequestUrl()
method
This method generates a verification request URL that user needs to visit to start the session.
Initialize the request when appropriate, e.g. on page loads
Once requestUrl
is set, display the QR or button for user to initiate verification.
To further customize the verification flow and UI, you can use the Web SDK advanced options