Skip to content

feat: added kinde provider documentation #401

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brettchaldecott
Copy link

@brettchaldecott brettchaldecott commented Apr 22, 2025

Description (required)

Added documentation detailing the use of the Kinde Provider

Related issues & labels (optional)

  • Closes #
  • Suggested label:

Summary by CodeRabbit

  • Documentation
    • Improved clarity and formatting throughout the React Native SDK documentation.
    • Enhanced Android and iOS installation instructions, including new setup steps for Ruby and Bundler on iOS.
    • Added a new section detailing the KindeProvider component and useKindeProvider hook for React Native SDK 0.7x, with usage examples.
    • Applied minor typographic fixes and standardized code block formatting.

Copy link
Contributor

coderabbitai bot commented Apr 22, 2025

Walkthrough

This update revises the React Native SDK documentation for improved clarity, formatting, and guidance. It introduces a new section detailing the useKindeProvider hook for React Native SDK 0.7x, explaining its role in SDK initialization, session management, and authentication state exposure. Additional instructions for setting up Ruby and Bundler prior to CocoaPods installation on iOS are provided. Minor typographic corrections and formatting improvements are applied throughout, with no changes to SDK APIs or exported function signatures.

Changes

File(s) Change Summary
src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx Updated documentation for clarity and formatting; added instructions for Ruby/Bundler setup on iOS; introduced section for useKindeProvider hook in React Native SDK 0.7x; made minor typographic and formatting corrections.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant useKindeProvider
    participant KindeSDK

    App->>useKindeProvider: Call hook on app initialization
    useKindeProvider->>KindeSDK: Initialize and cache SDK instance
    useKindeProvider->>KindeSDK: Manage session (validate/refresh token)
    useKindeProvider-->>App: Return { isAuthenticated, verifyToken, authSdk }
    App->>useKindeProvider: Use authentication state and SDK client
Loading

Possibly related PRs

  • docs: kinde auth provider #229: Adds documentation for a provider component managing authentication state and token refresh in the Next.js SDK, conceptually similar to the new React Native SDK useKindeProvider hook.

Suggested labels

sdk

Suggested reviewers

  • clairekinde11

Poem

In the docs a new hook hops in,
useKindeProvider—let sessions begin!
Ruby and Bundler join the show,
For smoother installs on iOS to flow.
With clarity and code blocks neat,
This update makes dev work sweet!
🐇✨


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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@github-actions github-actions bot added the sdk label Apr 22, 2025
Copy link
Contributor

@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: 0

🧹 Nitpick comments (5)
src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx (5)

49-51: Refine conversational tone
Consider a more formal phrasing for consistency with technical documentation.

- If you haven't already got a Kinde account, [register for free here](https://app.kinde.com/register) (no credit card required). Registering gives you a Kinde domain, which you need to get started, e.g. `yourapp.kinde.com`.
+ If you don't have a Kinde account, [register for free here](https://app.kinde.com/register) (no credit card required). Registering gives you a Kinde domain, which you need to get started, e.g. `yourapp.kinde.com`.

210-210: Fix duplicated word
The phrase repeats "local" twice.

- Note: The `myapp://myhost.kinde.com/kinde_callback` is used as an example of local local URL Scheme, change to the local local URL Scheme that you use.
+ Note: The `myapp://myhost.kinde.com/kinde_callback` is used as an example of a URL scheme for your app; replace it with your own URL scheme.
🧰 Tools
🪛 LanguageTool

[duplication] ~210-~210: Possible typo: you repeated a word.
Context: ...mple of local URL Scheme, change to the local local URL Scheme that you use. ## Environmen...

(ENGLISH_WORD_REPEAT_RULE)


222-225: Correct verb usage
Use "call back" (verb) instead of "callback" (noun) and consider slight rewording for clarity.

- `KINDE_POST_CALLBACK_URL` - After the user authenticates we will callback to this address. Make sure this URL is under your allowed callback URLs
+ `KINDE_POST_CALLBACK_URL` - After the user authenticates, we will call back to this address. Ensure this URL is listed in your allowed callback URLs.
🧰 Tools
🪛 LanguageTool

[grammar] ~223-~223: The word “callback” is a noun. The verb is spelled with a space.
Context: ... - After the user authenticates we will callback to this address. Make sure this URL is ...

(NOUN_VERB_CONFUSION)


1004-1006: Remove stray Markdown formatting
The _**//**_ markup appears unintended and can be cleaned up.

- await kinde.createOrg({org_name: 'your organization name'}); _**//**_
+ await kinde.createOrg({org_name: 'your organization name'}); // Optionally specify your organization name

1229-1230: Fix article usage
Use "an" before "integer" for grammatical correctness.

- Get a integer flag from the `feature_flags` claim of the access_token.
+ Get an integer flag from the `feature_flags` claim of the access_token.
🧰 Tools
🪛 LanguageTool

[misspelling] ~1230-~1230: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... black ### getIntegerFlag Get a integer flag from the feature_flags c...

(EN_A_VS_AN)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2003b3e and 9ec3de2.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx (27 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx

[duplication] ~210-~210: Possible typo: you repeated a word.
Context: ...mple of local URL Scheme, change to the local local URL Scheme that you use. ## Environmen...

(ENGLISH_WORD_REPEAT_RULE)


[grammar] ~223-~223: The word “callback” is a noun. The verb is spelled with a space.
Context: ... - After the user authenticates we will callback to this address. Make sure this URL is ...

(NOUN_VERB_CONFUSION)


[misspelling] ~1230-~1230: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... black ### getIntegerFlag Get a integer flag from the feature_flags c...

(EN_A_VS_AN)

🔇 Additional comments (14)
src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx (14)

77-77: Confirm consistency in step numbering
The Android build.gradle step aligns with the existing style.


96-96: Confirm consistency in step numbering
The MainApplication.java step follows the same pattern and is clear.


150-169: Approve Ruby & Bundler setup instructions
The new "Shell setup" section clearly guides users through installing Bundler and running CocoaPods via Bundler.


183-188: Approve Podfile update instructions
The added snippet for integrating RNKeychain and RNInAppBrowser via CocoaPods is clear and accurate.


191-194: Approve manual Xcode linking instructions
The bulleted steps for manually linking packages in Xcode are concise and complete.


201-203: Approve Kinde configuration steps
The numbered list for navigating to Settings > Applications is clear and properly formatted.


205-206: Approve callback URLs bullets
The examples for allowed callback and logout redirect URLs are correctly formatted.


318-320: Approve KindeProvider section header
The new section title clearly introduces the KindeProvider feature for React Native 0.7x.


322-326: Approve import usage example
The code snippet importing useKindeProvider is concise and correct.


328-330: Approve hook description
The explanation of what useKindeProvider does is clear and well-placed.


333-339: Approve usage example
The TypeScript example demonstrates proper hook usage with required parameters.


341-345: Approve return values list
The list of returned values from the hook is accurate and formatted consistently.


347-351: Approve benefits list
The bulleted list effectively highlights the advantages of using KindeProvider.


369-369: Approve note about SDK initialization
The reminder to define KindeSDK as a client variable is helpful and well-placed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants