diff --git a/content/docs/fully-hosted/bundles/age.mdx b/content/docs/fully-hosted/bundles/age.mdx new file mode 100644 index 0000000..36ac879 --- /dev/null +++ b/content/docs/fully-hosted/bundles/age.mdx @@ -0,0 +1,8 @@ +--- +title: The Age Bundle +description: Over 100 countries supported +--- + +Currently in Alpha : Please [contact support](mailto:harsha@reclaimprotocol.org) to get started. + +# Coming soon (March 2026) \ No newline at end of file diff --git a/content/docs/fully-hosted/bundles/default.mdx b/content/docs/fully-hosted/bundles/default.mdx new file mode 100644 index 0000000..196e713 --- /dev/null +++ b/content/docs/fully-hosted/bundles/default.mdx @@ -0,0 +1,49 @@ +--- +title: The Default Bundle +description: You must pass the provider ID +--- + +## You need a providerId +If you set the `bundleId` to `default`, you need to also pass the `providerId`. + +You can see all the providers [created by the Reclaim Protocol Community](https://dev.reclaimprotocol.org/explore). You can just copy the providerId from there. + +If you do not find a provider of your choice, you can build one yourself using the [Provider Builder](https://dev.reclaimprotocol.org/provider-builder). + +## UI +The user will be navigated directly to the login page of the providerId. There is no provider selection page. +![](/hosted-bundles/default-bundle.png) +![](/hosted-bundles/ui.png) +![](/hosted-bundles/verifying.png) +![](/hosted-bundles/complete.png) + +## Callback +To the callback you set, you will receive a json like so : +```json +{ + "data": { + "sessionId": "YOUR SESSION ID", + "applicationId": "YOUR APPLICATION ID", + "bundleId": "default", + "proofs": [ + { + "success": true, + "data": { + "PARAM_1_NAME": "PARAM_1_VALUE", + "PARAM_2_NAME": "PARAM_2_VALUE", + }, + "metadata": { + "verified": true, + "timestamp": 1766854715373 + } + } + ], + "timestamp": "2025-12-27T16:58:35.373Z" + }, + "signature": "0x5515a680e6f05d844c1e54aa231b...RECLAIMPROTOCOL_SIGNATURE" +} +``` + +You can see all the parameter's [descriptions here](../usage). + +However, unlike all other bundles, the parameters inside `proofs[i].data` will depend on the providerId you selected. You can see the provider's response schema on dev.reclaimprotocol.org. You must look for the `extractedParameterValues` of the provider schema. That is the object you will receive in `proofs[i].data`. \ No newline at end of file diff --git a/content/docs/fully-hosted/bundles/education.mdx b/content/docs/fully-hosted/bundles/education.mdx new file mode 100644 index 0000000..2ff5505 --- /dev/null +++ b/content/docs/fully-hosted/bundles/education.mdx @@ -0,0 +1,52 @@ +--- +title: The Education Bundle +description: Over 20k universities world wide supported +--- + +Currently in Beta : Please [contact support](mailto:harsha@reclaimprotocol.org) to get started. + +## Provider ID is optional +- If you want to ask the user which university they study in, followed by verification of that university - leave the `providerId` blank. The user will be presented with a search functionality to search for their university. +- If you know that the student is from a particular university and you want to verify if the student is enrolled in that specific university, you can pass the provider ID. You can find the provider ID from the [Dev Tool](https://dev.reclaimprotocol.org/explore). + +## UI +If the provider ID is not set, the user will be asked to choose their university +![](/hosted-bundles/education-bundle.png) +![](/hosted-bundles/ui.png) +![](/hosted-bundles/verifying.png) +![](/hosted-bundles/complete.png) + + + +## Callback +To the callback you set, you will receive a json like so : +```json +{ + "data": { + "sessionId": "YOUR SESSION ID", + "applicationId": "YOUR APPLICATION ID", + "bundleId": "default", + "proofs": [ + { + "success": true, + "data": { + "fullName": "...", // Mandatory + "fieldOfStudy": "...", // Optional. What the student is studying + "dob": "...", // Optional. Date of birth + "gradYear": "...", // Optional. Expected date of graduation + }, + "metadata": { + "verified": true, + "timestamp": 1766854715373 + } + } + ], + "timestamp": "2025-12-27T16:58:35.373Z" + }, + "signature": "0x5515a680e6f05d844c1e54aa231b...RECLAIMPROTOCOL_SIGNATURE" +} +``` + +You can see all the parameter's [descriptions here](../usage). +The fields in the `data` section will always be the same for all universities. +If you are using this to verify student enrollment, even if you know the provider ID, we recommend using `bundleId=education` so that we can make sure all the universities responses are consistently formatted. Because, we do see some community providers to have slightly different schema or parameters making it messy to manage all edgecases. \ No newline at end of file diff --git a/content/docs/fully-hosted/bundles/employment.mdx b/content/docs/fully-hosted/bundles/employment.mdx new file mode 100644 index 0000000..e3861c5 --- /dev/null +++ b/content/docs/fully-hosted/bundles/employment.mdx @@ -0,0 +1,8 @@ +--- +title: The Employment Bundle +description: Over 1500 employers world wide supported +--- + +Currently in Alpha : Please [contact support](mailto:harsha@reclaimprotocol.org) to get started. + +# Coming soon (March 2026) \ No newline at end of file diff --git a/content/docs/fully-hosted/bundles/meta.json b/content/docs/fully-hosted/bundles/meta.json new file mode 100644 index 0000000..9be04e8 --- /dev/null +++ b/content/docs/fully-hosted/bundles/meta.json @@ -0,0 +1,9 @@ +{ + "title": "Bundle specific options", + "pages": [ + "default", + "education", + "employment", + "age" + ] +} \ No newline at end of file diff --git a/content/docs/fully-hosted/index.mdx b/content/docs/fully-hosted/index.mdx new file mode 100644 index 0000000..2661447 --- /dev/null +++ b/content/docs/fully-hosted/index.mdx @@ -0,0 +1,24 @@ +--- +title: Fully Hosted Solution +description: Easiest way to integrate Reclaim Protocol +--- + +The hosted solution is the easiest way to integrate Reclaim Protocol on a website. +We will manage all the plumbing for you, along with several custom UI. + +# Are you in the right place? +Though for most websites, this is the easiest way to get started, this might not be the right fit if : +- If you are looking to integrate in an app, please jump to Android Kotlin, iOS Swift, React Native or Flutter sections. +- If you don't want us to manage the UI, you can jump to js-sdk +- If you are looking to do verifications without any user interactions, jump to zk-fetch + +# Optimized UIs +The hosted solution has dedicated implementations for +- **Education verification** : Where the user must select their university before proceeding to verification. User will then be asked to login into their university portal in order to verify if they are a student there. We manage all the mapping for all university and respective university portals. +- **Employment verification** : Where the user must select their employer before proceeding to verification. Depending on the country the user is in, and the employer they select, they will be redirected to the appropriate website from which they can login. This includes HRIS portals, Tax Portals or Communication Apps like Slack and Teams. +- **Age verification** : Where user must select their country of residence. Depending on the country of residence, we will manage the right way for the user to verify their age. +- **All other verifications** : For all other verifications, you can pass a providerID, to tell us what to verify, and we will display the right UI to the user and manage the verification. + +The UI is minimalistic and designed to get out of the way of the user, but still building trust that this is safe to verify using this process. +![Base ui](/hosted-bundles/ui.png) +![Safety prompt](/hosted-bundles/safe.png) diff --git a/content/docs/fully-hosted/installation.mdx b/content/docs/fully-hosted/installation.mdx new file mode 100644 index 0000000..1e8264e --- /dev/null +++ b/content/docs/fully-hosted/installation.mdx @@ -0,0 +1,14 @@ +--- +title: Installation +description: No installation needed! +--- + +## Get an API Key +Setup your project using the [Get API Key guide](/api-key). + +## Pick your bundle +There are 4 supported bundles +- `education`, where the user has to select the university. You will receive the user's University Name and student information. [See details](./education). +- `employment`, where user has to select the country and employer. You will receive the user's Employer and other employee information. [See details](./employment). +- `age`, where user has to select the country. You will receive the country and user's age. [See details](./employment). +- `default`, where you will have to set a providerID. [See details](./default). \ No newline at end of file diff --git a/content/docs/fully-hosted/meta.json b/content/docs/fully-hosted/meta.json new file mode 100644 index 0000000..3f8efc8 --- /dev/null +++ b/content/docs/fully-hosted/meta.json @@ -0,0 +1,9 @@ +{ + "title": "Fully Hosted Solution", + "pages": [ + "index", + "installation", + "usage", + "bundles" + ] +} \ No newline at end of file diff --git a/content/docs/fully-hosted/usage.mdx b/content/docs/fully-hosted/usage.mdx new file mode 100644 index 0000000..2a0f0d4 --- /dev/null +++ b/content/docs/fully-hosted/usage.mdx @@ -0,0 +1,86 @@ +--- +title: Usage +description: Generate url and redirect user +--- +import { Tab, Tabs } from "fumadocs-ui/components/tabs"; + +## Generate a signed url +The first step is to generate a signed URL. This signed URL will be the destination where the user should be redirected to, to complete the verification. + +Sample implementation [here](https://github.com/reclaimprotocol/hosted-bundles/blob/master/app/dummy-website/page.tsx). + + + + ``` + curl -X POST https://hosted-bundles.reclaimprotocol.org/api/helper/generate-signed-url \ + -H "Content-Type: application/json" \ + -d '{ + "applicationSecret": "YOUR_APPLICATION_SECRET", + "bundleId": "SELECTED_BUNDLE", + "callbackUrl": "YOUR_CALLBACK", + "sessionId": "YOUR_SESSIONID", + "providerId": "SELECTED_PROVIDERID" + }' + ``` + + + ``` + const response = await fetch('https://hosted-bundles.reclaimprotocol.org/api/helper/generate-signed-url', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + applicationSecret: process.env.APPLICATION_SECRET, + bundleId: 'SELECTED_BUNDLE', + callbackUrl: 'YOUR_CALLBACK', + sessionId: 'YOUR_SESSIONID', + providerId: 'SELECTED_PROVIDERID' + }) + }); + + const data = await response.json(); + const url = data.url; + ``` + + + + +### Understanding the parameters +- `applicationSecret` from [Get your API Keys](/api-key) +- `bundleId` - one of `education`, `employment`, `age`, `default`. See [installation](installation) for information to pick a bundleId. +- `callbackUrl` - a `POST` endpoint where the verified data will be sent. See next section for details. +- `sessionId` - a session identifier that you can use to identify the user on your system. We will send this session id back to you so you can map the verification to the said user. +- `providerId` - if you know a provider in specific that you want to use, you can set that here. You can see all the available providers on the [Developer Tool](https://dev.reclaimprotocol.org/explore). If you selected `default` for bundleId, you must set a providerId, else it is optional and user will be asked to select the provider using a managed UI. + +## Receiving the proof +You must expose a `POST` endpoint. That accepts a json object. +```js +const body = await request.json(); +``` + +### Verify +To make sure this is data that actually came from us, you can use a helper function. Just pass the body as is to the signature verification endpoint. + +Sample implementation [here](https://github.com/reclaimprotocol/hosted-bundles/blob/master/app/api/dummy-callback/route.ts). + +```js + const verifyResponse = await fetch(`https://hosted-bundles.reclaimprotocol.org/api/helper/verify-callback`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(body), + }); + + const verifyResult = await verifyResponse.json(); + const isVerified = verifyResult.verified; +``` +Once it is verified, you can confidently use the data you received. Please see bundle specific guides for processing data from that bundle. +- [`default`](./bundles/default) +- [`education`](./bundles/education) +- [`employment`](./bundles/employment) +- [`age`](./bundles/age) + +### Troubleshooting +- Make sure CORS is enabled on this endpoint diff --git a/content/docs/meta.json b/content/docs/meta.json index a19cbf9..0f089dc 100644 --- a/content/docs/meta.json +++ b/content/docs/meta.json @@ -3,6 +3,7 @@ "pages": [ "index", "api-key", + "fully-hosted", "js-sdk", "react-native", "flutter", diff --git a/public/hosted-bundles/complete.png b/public/hosted-bundles/complete.png new file mode 100644 index 0000000..3de5e3d Binary files /dev/null and b/public/hosted-bundles/complete.png differ diff --git a/public/hosted-bundles/default-bundle.png b/public/hosted-bundles/default-bundle.png new file mode 100644 index 0000000..fa20f23 Binary files /dev/null and b/public/hosted-bundles/default-bundle.png differ diff --git a/public/hosted-bundles/education-bundle.png b/public/hosted-bundles/education-bundle.png new file mode 100644 index 0000000..1af3c28 Binary files /dev/null and b/public/hosted-bundles/education-bundle.png differ diff --git a/public/hosted-bundles/safe.png b/public/hosted-bundles/safe.png new file mode 100644 index 0000000..905be81 Binary files /dev/null and b/public/hosted-bundles/safe.png differ diff --git a/public/hosted-bundles/ui.png b/public/hosted-bundles/ui.png new file mode 100644 index 0000000..2a636ed Binary files /dev/null and b/public/hosted-bundles/ui.png differ diff --git a/public/hosted-bundles/verifying.png b/public/hosted-bundles/verifying.png new file mode 100644 index 0000000..0c3b3a2 Binary files /dev/null and b/public/hosted-bundles/verifying.png differ