-
Notifications
You must be signed in to change notification settings - Fork 11
docs: add provider versioning and update expo sdk docs #70
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
Conversation
Signed-off-by: kryptocodes <srivatsantb@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe 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
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
Estimated code review effort2 (~15 minutes) Possibly related PRs
Suggested labels
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
♻️ Duplicate comments (1)
content/docs/expo/usage.mdx (1)
162-165: Same potential 404 as in Installation guideLink uses
../advance-options/web-sdk; verify the folder spelling (advanced-optionsvsadvance-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 exampleThe 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 styleElsewhere 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 wrongThe link points to
../advance-options/web-sdk, but elsewhere in the docs the folder is normally spelledadvanced-options.
Please verify and adjust to avoid 404s.
132-135: Provide actionable workaround details for the iOS incompatibilityThe 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 iOSand a note that they can reinstall afterwards.
content/docs/expo/usage.mdx (1)
25-28: Import statement incomplete for the later snippetsLater examples reference
ReclaimVerification.ReclaimVerificationExceptionandReclaimVerification.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
📒 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-sdkreplaces the previous package name in all installation commands.
Please confirm that:
- The package is already published on npm (or GitHub Packages) under exactly this name.
- 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.ReclaimVerificationExceptionmay fail at runtimeIf the SDK re-exports the exception class, the usual pattern is:
error instanceof ReclaimVerificationExceptionUsing a nested property can break when the library bundles multiple copies, leading to
instanceofmismatches.
Please verify the recommended usage in the SDK docs and update accordingly.
| 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(); | ||
| ``` |
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.
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.
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
Checklist:
Summary by CodeRabbit