-
Notifications
You must be signed in to change notification settings - Fork 11
Add introduction, backend verification docs to the inapp/ documentation
#49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
5 changes: 3 additions & 2 deletions
5
content/docs/inapp-sdks/usage/intro.mdx → content/docs/inapp-sdks/advanced/intro.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| "title": "Usage", | ||
| "pages": [ | ||
| "intro", | ||
| "verification-options", | ||
| "attestor-auth", | ||
| "overrides" | ||
| ] | ||
|
|
||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| ] | ||
| } |
4 changes: 2 additions & 2 deletions
4
...ent/docs/inapp-sdks/react-native-expo.mdx → ...p-sdks/installation/react-native-expo.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
|
|
||
| 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) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
📝 Committable suggestion
🧰 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)