Overview
You can use Reclaim SDK directly in your app without needing any backend changes. If you want to implement your own authentication mechanism to keep user's data secure - we recommend using the backend implementation of the JS SDK.
However, the JS SDK is a great way to get something going quickly. Particularly good for MVPs.
Flows
Integrating Reclaim on a Desktop Website
The flow looks like follows
- User Login: The user logs in into your website
- Session Creation: Your website creates a new session for this user using the Reclaim SDK, requesting data from the website that you configure in the SDK; This returns a URI.
- QR Code Display: Your website displays a QR code linked to the URI for the user's session.
- QR Code Scan: User scans the QR code using their mobile phone regular camera
- Login Prompt: User is prompted to login into Acme.com on a webview
- Proof Generation: Once user has logged in, a proof is generated on the user's device
- Proof Submission: User hits submit to upload the proof
- Business Logic: Your website executes business logic basis the proof submitted by the user
Integrating Reclaim on a Mobile Website
The flow remains pretty much the same. After step 2 (session creation), the flow diverges into the following steps:
- Device Detection: Identify the user's device type (desktop or mobile) to tailor the flow, at step 3.
- Button Display: Instead of a QR code, display a button linked to the session-specific URI.
- Steps 4 to 8 are identical to the desktop integration, starting from the user tapping the button, through to the execution of business logic based on the submitted proof.
Where to use the sdk in your app
You can use the sdk to generate proof reqeusts either in your backend or frontend We will be showing examples for both the cases in the following sections.