Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.1.0

* Added EU region support documentation for JS SDK - use `https://eu.portal.reclaimprotocol.org` as `customSharePageUrl` to automatically route API requests to the EU backend
* **JS SDK**: When using a regional portal (any `customSharePageUrl` other than `share.reclaimprotocol.org` or `portal.reclaimprotocol.org`), you must now set a callback URL using `setAppCallbackUrl()`. The SDK throws a `CallbackUrlRequiredError` if missing.
* Added log event type documentation for inapp sdk and inapp react native sdk
21 changes: 21 additions & 0 deletions content/docs/js-sdk/preparing-request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,27 @@ const proofRequest = await ReclaimProofRequest.init(APP_ID, APP_SECRET, PROVIDER
});
```

## EU Region Support
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: Based on changes in src/Reclaim.ts that add automatic EU backend detection when customSharePageUrl contains eu.portal.reclaimprotocol.org. The SDK sets the backend base URL to https://eu.api.reclaimprotocol.org automatically.
View source


To keep data within EU infrastructure, use the EU portal URL:

```js
proofRequestOptions = {
..., //other options, if any
useAppClip: false,
customSharePageUrl: 'https://eu.portal.reclaimprotocol.org'
}
const proofRequest = await ReclaimProofRequest.init(appId, appSecret, providerId, proofRequestOptions);

// Required: set a callback URL when using regional portals
proofRequest.setAppCallbackUrl('https://yourbackend.com/reclaim-callback');
```

Setting `customSharePageUrl` to the EU portal automatically routes API requests to `https://eu.api.reclaimprotocol.org`. No additional backend configuration needed.

> [!IMPORTANT]
> When using a regional portal (any `customSharePageUrl` other than `share.reclaimprotocol.org` or `portal.reclaimprotocol.org`), you must set a callback URL using `setAppCallbackUrl()`. The SDK throws a `CallbackUrlRequiredError` if you don't.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: Added callback URL requirement based on validation in src/Reclaim.ts that checks if customSharePageUrl hostname is not share.reclaimprotocol.org or portal.reclaimprotocol.org, then requires appCallbackUrl to be set. Throws CallbackUrlRequiredError if missing.
View source


## Using the in-browser SDK
<Callout type="warning">
In-Browser SDK use is available only for users on a premium enterprise plan. Please [contact support](https://t.me/protocolreclaim) for more details.
Expand Down