Skip to content

Conversation

@kryptocodes
Copy link
Contributor

@kryptocodes kryptocodes commented Jul 23, 2025

Description

Update documentation for Reclaim InApp SDK integration in React Native Expo, including installation instructions, usage examples, and compatibility notices. Added provider versioning details and improved error handling in the verification flow.

Testing (ignore for documentation update)

n/a

Type of change

  • [] Bug fix
  • [] New feature
  • [] Breaking change
  • Documentation update

Checklist:

Summary by CodeRabbit

  • Documentation
    • Added a section on provider versioning to the Web SDK documentation, explaining semantic versioning support and usage examples.
    • Updated Expo installation guide to specify the InApp SDK package and added a compatibility warning for iOS users regarding expo-dev-client conflicts.
    • Revised Expo usage documentation to reflect the new InApp SDK, streamlined the verification flow, improved error handling examples, and introduced an advanced usage section for configuration overrides.

Signed-off-by: kryptocodes <srivatsantb@gmail.com>
@kryptocodes kryptocodes requested a review from Kushal7788 July 23, 2025 16:56
@vercel
Copy link

vercel bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2025 4:57pm

@coderabbitai
Copy link

coderabbitai bot commented Jul 23, 2025

Walkthrough

The documentation was updated to introduce a new section on provider versioning in the web SDK, clarify installation and usage instructions for the Expo InApp SDK, and revise integration examples and error handling for React Native Expo apps. No changes were made to source code or exported/public entities.

Changes

File(s) Change Summary
content/docs/advance-options/web-sdk.mdx Added a new "Provider Versioning (optional)" section detailing semantic versioning, usage, and code examples for the SDK.
content/docs/expo/installation.mdx Updated installation instructions to use the InApp SDK package; added compatibility warning for iOS and expo-dev-client.
content/docs/expo/usage.mdx Revised integration guide for the InApp SDK, updated code samples, error handling, and added advanced usage instructions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ReactNativeApp
    participant ReclaimInAppSDK

    User->>ReactNativeApp: Press "Start Verification" button
    ReactNativeApp->>ReclaimInAppSDK: startVerification()
    ReclaimInAppSDK-->>ReactNativeApp: Verification result or error
    ReactNativeApp->>User: Show verification status or error alert
Loading

Estimated code review effort

2 (~15 minutes)

Possibly related PRs

Suggested labels

documentation

Poem

In the warren of docs, a new section appears,
With versioning wisdom for all rabbit peers.
Expo hops forward, InApp SDK in tow,
Clearer instructions help our gardens grow.
Error-handling carrots, advanced tips in the sun—
This patch is complete, our work here is done!
🥕


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
content/docs/expo/usage.mdx (1)

162-165: Same potential 404 as in Installation guide

Link uses ../advance-options/web-sdk; verify the folder spelling (advanced-options vs advance-options) to avoid broken links.

🧹 Nitpick comments (5)
content/docs/advance-options/web-sdk.mdx (2)

67-69: Fix broken Markdown inline-code formatting for range operator example

The second example is missing both the opening single quote and the back-tick, so it renders incorrectly and breaks syntax highlighting.

- - **Range operators**: `'>=1.0.0'`, <2.0.0'`, etc.
+ - **Range operators**: `'>=1.0.0'`, `'<2.0.0'`, etc.

81-85: Minor consistency tweak – align inline comment style

Elsewhere in the doc you use “// optional fields” comments on a separate line; here it’s appended. Moving it keeps visual consistency.

-        providerVersion: '1.0.0' // locks to specific schema version
+        // locks to specific schema version
+        providerVersion: '1.0.0'
content/docs/expo/installation.mdx (2)

110-111: Broken internal link: “Advance Options” path likely wrong

The link points to ../advance-options/web-sdk, but elsewhere in the docs the folder is normally spelled advanced-options.
Please verify and adjust to avoid 404s.


132-135: Provide actionable workaround details for the iOS incompatibility

The warning is helpful, but readers may wonder how to “temporarily remove expo-dev-client”.
Consider adding a one-liner such as:

expo uninstall expo-dev-client   # remove before testing ReclaimInAppSdk on iOS

and a note that they can reinstall afterwards.

content/docs/expo/usage.mdx (1)

25-28: Import statement incomplete for the later snippets

Later examples reference ReclaimVerification.ReclaimVerificationException and ReclaimVerification.ExceptionType.
If the SDK exports these as top-level symbols it is clearer to import them explicitly:

import {
  ReclaimVerification,
  ReclaimVerificationException,
  ExceptionType,
} from '@reclaimprotocol/inapp-rn-sdk';

This prevents type-checking / tree-shaking issues in TS/ESM projects.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c703e2e and 9ce237b.

📒 Files selected for processing (3)
  • content/docs/advance-options/web-sdk.mdx (1 hunks)
  • content/docs/expo/installation.mdx (4 hunks)
  • content/docs/expo/usage.mdx (2 hunks)
🔇 Additional comments (2)
content/docs/expo/installation.mdx (1)

24-37: Double-check package name & publish status before merging

@reclaimprotocol/inapp-rn-sdk replaces the previous package name in all installation commands.
Please confirm that:

  1. The package is already published on npm (or GitHub Packages) under exactly this name.
  2. The latest release contains the APIs referenced in the updated Usage guide.

If the package is private or not yet published, the commands will fail for consumers following the docs.
Add a note about the required registry or publish timeline if necessary.

content/docs/expo/usage.mdx (1)

76-100: instanceof ReclaimVerification.ReclaimVerificationException may fail at runtime

If the SDK re-exports the exception class, the usual pattern is:

error instanceof ReclaimVerificationException

Using a nested property can break when the library bundles multiple copies, leading to instanceof mismatches.
Please verify the recommended usage in the SDK docs and update accordingly.

Comment on lines +32 to 40
Initialize the ReclaimVerification class to create an instance:

```javascript
const APP_ID = 'YOUR_APPLICATION_ID';
const APP_SECRET = 'YOUR_APPLICATION_SECRET';
const PROVIDER_ID = 'YOUR_PROVIDER_ID';

async function initializeReclaim() {
const reclaimProofRequest = await ReclaimProofRequest.init(APP_ID, APP_SECRET, PROVIDER_ID);
return reclaimProofRequest;
}
const reclaimVerification = new ReclaimVerification();
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Security notice contradicts example – secret placed in client code

Line 16 warns “Never include your Application Secret in client-side code”, yet the snippet hard-codes APP_SECRET.
Either move the secret to a secure backend example or add a disclaimer explaining this is only for demo purposes.

🤖 Prompt for AI Agents
In content/docs/expo/usage.mdx around lines 32 to 40, the example code
hard-codes the APP_SECRET in client-side code, which contradicts the security
notice on line 16 advising against this. To fix, either move the APP_SECRET
usage to a backend example or add a clear disclaimer in the snippet stating that
hard-coding the secret is only for demonstration purposes and should never be
done in production client code.

@kryptocodes kryptocodes merged commit 6092815 into main Jul 23, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants