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: 1 addition & 1 deletion content/docs/backend/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ yarn add @reclaimprotocol/js-sdk
#### Importing the SDK

```python
from reclaim-python-sdk import ReclaimProofRequest
from reclaim_python_sdk import ReclaimProofRequest
```
</Tab>
</Tabs>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
title: More about Reclaim InApp SDKs
title: Usage
description: Documentation for advanced usage of Reclaim InApp SDKs.
---

# Usage
# More about Reclaim InApp SDKs

The InApp SDKs also allows more functionalities, like overriding several configurations used in the verification process by the SDK.

## Table of Contents

* [Verification Options](./verification-options)
* [Attestor Auth](./attestor-auth)
* [Overrides](./overrides)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"title": "Usage",
"pages": [
"intro",
"verification-options",
"attestor-auth",
"overrides"
]
Expand Down
17 changes: 17 additions & 0 deletions content/docs/inapp-sdks/advanced/verification-options.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Verification Options
description: Customize the default verification flow with Reclaim Protocol's InApp SDKs
---

import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';

## Options API

| Prop | Type | Description |
| ---------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------- |
| **`canDeleteCookiesBeforeVerificationStarts`** | <code>boolean</code> | This is enabled by default. Set false to persist sessions storage for the user. (This will be replaced with `canClearWebStorage` in an upcoming update) |
| **`canUseAttestorAuthenticationRequest`** | <code>boolean</code> | Enable the use of authentication request when starting a verification |
| **`claimCreationType`** | <code>'standalone' \| 'meChain'</code> | The type of claim creation to use. Defaults to 'standalone'. |
| **`canAutoSubmit`** | <code>boolean</code> | Whether to automatically submit the proof after generation. Defaults to true. When false, a prompt to submit is shown to the user. |
| **`isCloseButtonVisible`** | <code>boolean</code> | Whether the close button is visible in the verification screen. Defaults to true. |
16 changes: 0 additions & 16 deletions content/docs/inapp-sdks/flutter.mdx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Android SDK
title: Android
description: Reclaim Protocol's InApp Android SDK for ZK proof generations for requests with an in-app experience of web verification
---

Expand Down Expand Up @@ -161,4 +161,4 @@ fun setOverrides() {
}
```

Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](./usage/overrides)
Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](./../advanced/overrides)
140 changes: 140 additions & 0 deletions content/docs/inapp-sdks/installation/flutter.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: Flutter
description: Available upon request - Reclaim Protocol integration for Flutter applications
---

# Get Started

<Callout type="info">
The Reclaim Protocol SDK for Flutter (android & iOS) applications is ready and available upon request. Contact our team to discuss implementation details.
</Callout>

A Flutter SDK for integrating Reclaim's verification system directly into your Flutter applications. This SDK allows you to verify user credentials and generate proofs in-app.

## Features

- In-app verification flow
- Customizable verification options
- ZK Proof generation
- Compatible when using Flutter "Add to App modules" in your native applications

## Prerequisites

- An Android application source code (Support for Android 5.0 or later).
- An Android device or emulator running Android 5.0 or later.
- A Reclaim account where you've created an app and have the app id, app secret.
- A provider id that you've added to your app in Reclaim Devtools.

## Installation

Add the following to your `pubspec.yaml`:

```yaml
dependencies:
reclaim_inapp_flutter_sdk: ^latest_version
```


## Usage

### Basic Setup

1. Import the SDK in your Dart file:

```dart
import 'package:reclaim_inapp_flutter_sdk/reclaim_inapp_flutter_sdk.dart';
```

2. Initialize the SDK with your app credentials:

Following is an exmaple.

```dart
const String appId = String.fromEnvironment('APP_ID');
const String appSecret = String.fromEnvironment('APP_SECRET');
const String providerId = String.fromEnvironment('PROVIDER_ID');
```

### Starting Verification

```dart
final sdk = ReclaimInAppSdk.of(context);
final proofs = await sdk.startVerification(
ReclaimVerificationRequest(
appId: appId,
providerId: providerId,
secret: appSecret,
sessionInformation: ReclaimSessionInformation.empty(),
contextString: '',
parameters: {},
claimCreationType: ClaimCreationType.standalone,
),
);
```

### Configuration Options

The `ReclaimVerificationRequest` supports the following options:

- `appId`: Your Reclaim application ID
- `providerId`: The ID of the provider you want to verify against
- `secret`: Your application secret (optional if using session information)
- `sessionInformation`: Session information for authentication
- `contextString`: Additional context for the verification
- `parameters`: Custom parameters for the verification
- `claimCreationType`: Type of claim creation (standalone or meChain)
- `autoSubmit`: Whether to auto-submit the verification
- `hideCloseButton`: Whether to hide the close button
- `webhookUrl`: URL for webhook notifications
- `verificationOptions`: Additional verification options

### Error Handling

The SDK throws specific exceptions that you can handle:

```dart
try {
final proofs = await sdk.startVerification(request);
} on ReclaimExpiredSessionException {
// Handle expired session
} on ReclaimVerificationManualReviewException {
// Handle manual review case
} catch (error) {
// Handle other errors if required
}
```

### Pre-warming

For better performance, you can pre-warm the SDK:

```dart
void main() async {
WidgetsFlutterBinding.ensureInitialized();
ReclaimInAppSdk.preWarm();
runApp(MyApp());
}
```

## Example

Check out the [example](example/lib/main.dart) for a complete implementation.

## Environment Variables

The SDK requires the following environment variables:

- `APP_ID`: Your Reclaim application ID
- `APP_SECRET`: Your application secret
- `PROVIDER_ID`: The ID of the provider to verify against

You can provide these values using:

- Dart Define Env file: `--dart-define-from-file=./.env`
- Hardcoded values (not recommended for production)

### Stay Updated

- Join our [Telegram community](https://t.me/protocolreclaim)
- Follow [@reclaimprotocol](https://twitter.com/reclaimprotocol) on Twitter
- Watch our [GitHub repository](https://github.com/reclaimprotocol)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Ionic - Capacitor SDK
title: Ionic - Capacitor
description: Reclaim Protocol's Capacitor SDK for ZK proof generations for requests with an in-app experience of web verification
---

Expand Down Expand Up @@ -391,7 +391,7 @@ reclaimVerification.setOverrides({
})
```

Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](./usage/overrides)
Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](../advanced/overrides)

## Contributing

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: iOS SDK
title: iOS
description: Reclaim Protocol's InApp iOS SDK for ZK proof generations for requests with an in-app experience of web verification
---

Expand Down Expand Up @@ -319,7 +319,7 @@ func setOverrides() {
}
```

Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](./usage/overrides)
Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](../advanced/overrides)

## Upgrading

Expand Down
11 changes: 11 additions & 0 deletions content/docs/inapp-sdks/installation/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "Installation",
"pages": [
"android",
"ios",
"react-native",
"ionic-capacitor",
"flutter",
"react-native-expo"
]
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: React Native Expo SDK
title: React Native Expo
description: Available upon request - Reclaim Protocol integration for Expo-managed React Native applications
---

# React Native Expo SDK

<Callout type="info">
The Reclaim Protocol SDK for Expo-managed React Native applications is available upon request. Contact our team to discuss implementation details.
The Reclaim Protocol SDK for Expo-managed React Native applications is available upon request. Contact our team to discuss implementation details.
</Callout>

### Stay Updated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: React Native SDK
title: React Native
description: Reclaim Protocol's InApp React Native SDK for ZK proof generations for requests with an in-app experience of web verification
---

Expand Down Expand Up @@ -343,7 +343,7 @@ reclaimVerification.setOverrides({
})
```

Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](./usage/overrides)
Read more about overrides in [Reclaim InApp SDK Documentation | Overrides](../advanced/overrides)

## Contributing

Expand Down
47 changes: 47 additions & 0 deletions content/docs/inapp-sdks/introduction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Introduction
description: The InApp SDKs enables seamless in-app verification experience for your users. No redirection, and no requirement for installing a new app—really no need for your users to leave your app!
---

## Integration

Following is an example on how we used the [Github Username Provider](https://dev.reclaimprotocol.org/provider/6d3f6753-7ee6-49ee-a545-62f1b1822ae5) with the InApp SDK in an ios native application to verify Github account ownership.

<video src="/assets/inapp/inapp_demo.mp4" alt="Using InApp SDK to verify Github ownership" width="400px" type="video/mp4" controls></video>

Comment on lines +8 to +11
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Correct grammar and capitalization
Update “Following is an example on how we used the [Github Username Provider] with the InApp SDK in an ios native application to verify Github account ownership.” to:

-Following is an example on how we used the [Github Username Provider] with the InApp SDK in an ios native application to verify Github account ownership.
+Here’s an example of how we used the [GitHub Username Provider] with the InApp SDK in an iOS native application to verify GitHub account ownership.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Following is an example on how we used the [Github Username Provider](https://dev.reclaimprotocol.org/provider/6d3f6753-7ee6-49ee-a545-62f1b1822ae5) with the InApp SDK in an ios native application to verify Github account ownership.
<video src="/assets/inapp/inapp_demo.mp4" alt="Using InApp SDK to verify Github ownership" width="400px" type="video/mp4" controls></video>
Here’s an example of how we used the [GitHub Username Provider](https://dev.reclaimprotocol.org/provider/6d3f6753-7ee6-49ee-a545-62f1b1822ae5) with the InApp SDK in an iOS native application to verify GitHub account ownership.
<video src="/assets/inapp/inapp_demo.mp4" alt="Using InApp SDK to verify Github ownership" width="400px" type="video/mp4" controls></video>
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: The preposition “of” seems more likely in this position.
Context: ...## Integration Following is an example on how we used the [Github Username Provid...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)

This is how Reclaim's verification flow can be fully integrated within your native mobile application.

## Installation

The InApp SDKs are available on all major mobile platforms. For each platform, you can find the installation instructions in the following pages:

* [Android](./installation/android)
* [iOS](./installation/ios)
* [React Native](./installation/react-native)
* [React Native Expo](./installation/react-native-expo)
* [Flutter](./installation/flutter)
* [Ionic - Capacitor](./installation/ionic-capacitor)

You can request an addition of new platform/framework, contact us for more info.

## Verification

Proofs generated on the client must be verified at the backend. Follow the instructions from [the Backend Verification Guide](./verification).

## Advanced Usage

You can customize the verification flow with options, and, as an advanced use—set up overrides or use authentication with the attestor. Learn more from [the Usage documentation](./advanced/intro).

### Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

### Issues and Feedback

Please feel free to file feature requests and bugs at the issue tracker of InApp sdks. Don't hesitate to contact us if you need any help ;)

### Stay Updated

- Join our [Telegram community](https://t.me/protocolreclaim)
- Follow [@reclaimprotocol](https://twitter.com/reclaimprotocol) on Twitter
- Watch our [GitHub repository](https://github.com/reclaimprotocol)
11 changes: 4 additions & 7 deletions content/docs/inapp-sdks/meta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"title": "Reclaim InApp SDKs",
"pages": [
"android",
"ios",
"react-native",
"ionic-capacitor",
"flutter",
"react-native-expo",
"usage"
"introduction",
"installation",
"verification",
"advanced"
]
}
Loading