feat: start of expo guide#414
Conversation
WalkthroughThe documentation for integrating the Kinde React Native SDK with Expo was rewritten to focus solely on the Expo managed workflow. All bare React Native instructions were removed, and the guide now uses the Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant KindeAuthProvider
participant useKindeAuth
participant Kinde Auth Service
App->>KindeAuthProvider: Wrap app with provider (config)
App->>useKindeAuth: Call hook in component
App->>useKindeAuth: Call login/register/logout methods
useKindeAuth->>Kinde Auth Service: Initiate authentication via in-app browser
Kinde Auth Service-->>useKindeAuth: Return tokens and user info
useKindeAuth-->>App: Expose user, tokens, roles, permissions, etc.
Suggested reviewers
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 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.
Actionable comments posted: 2
🧹 Nitpick comments (4)
src/content/docs/developer-tools/sdks/native/expo-react-native.mdx (4)
3-3: Title specificity: Clarify document scope.The frontmatter title is now simply
Expo, which may be too generic in the sidebar and page header. Consider renaming to something like “Expo Managed Workflow” or “Expo (React Native SDK)” to clearly convey that this guide covers the Kinde React Native SDK for Expo.
27-31: Section header phrasing and install step grammar.
- For consistency, consider changing “### Install package” to “### Install the package”.
- Ensure the
<PackageManagers>component correctly renders the install command for@kinde-oss/react-native-sdk-0-7x.
81-83: Component imports missing.The snippet uses
<Pressable>and<ThemedText>without import statements. Consider adding:import { Pressable } from 'react-native'; import { ThemedText } from '@kinde-oss/react-native-sdk-0-7x';or the correct module paths to make the example self-contained.
86-88: Grammar: add missing article “an”.
- Change “accept and object” → “accept an object”
- Change “Logout accepts object which allows you…” → “Logout accepts an object which allows you…”
🧰 Tools
🪛 LanguageTool
[uncategorized] ~88-~88: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...(AI_EN_LECTOR_MISSING_DETERMINER_AN)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/content/docs/developer-tools/sdks/native/expo-react-native.mdx(2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/native/expo-react-native.mdx
[uncategorized] ~88-~88: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...
(AI_EN_LECTOR_MISSING_DETERMINER_AN)
🔇 Additional comments (5)
src/content/docs/developer-tools/sdks/native/expo-react-native.mdx (5)
19-19: Approve registration step.The call-out to register for a Kinde account is clear, direct, and essential for new users. Linking straight to the signup page is user-friendly.
25-25: Approve environment installation link.Referencing the official React Native environment-setup guide offloads maintenance and ensures users follow up-to-date instructions. This is concise and effective.
91-92: Approve logout usage example.The snippet correctly shows revoking tokens with
kinde.logout({ revokeToken: true }), matching the updated API.
96-105: Verify utility import path consistency.You import utils from
@kinde/expo/utilswhile the SDK package is scoped@kinde-oss. Please confirm that the utilities package name is indeed@kinde/expo/utilsand update if necessary.
145-148: Link target verification for permissions guide.The link points to
/manage-users/roles-and-permissions/user-permissions/. After the documentation refactor, please verify this path still resolves correctly.
Deploying kinde-docs-previews with
|
| Latest commit: |
6ba83a1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e0c6e9d6.kinde-docs-previews.pages.dev |
| Branch Preview URL: | https://daniel-feat-expo.kinde-docs-previews.pages.dev |
e399e4c to
3f87152
Compare
3f87152 to
d8fb3b9
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (9)
src/content/docs/developer-tools/sdks/native/expo.mdx (9)
17-18: Refine intro for clarity
"This SDK is for people using Expo." could be more precise. Consider rephrasing to something like:- The Kinde React Native SDK allows developers to quickly and securely integrate a new or an existing React Native application into the Kinde platform. This SDK is for people using Expo. + The Kinde React Native SDK allows developers to quickly and securely integrate a new or existing Expo-managed application into the Kinde platform.
37-53: Add closing tag for<KindeAuthProvider>snippet
The code block shows the opening<KindeAuthProvider>but doesn’t include its closing tag, which may confuse readers. Consider adding the corresponding closing tag around your app component, for example:<KindeAuthProvider config={{ /* ... */ }} callbacks={{ /* ... */ }} > {/* Your application components */} - + </KindeAuthProvider>
88-91: Fix missing article in logout description- Logout accepts object which allows you to revoke the token + Logout accepts an object which allows you to revoke the token🧰 Tools
🪛 LanguageTool
[uncategorized] ~90-~90: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...(AI_EN_LECTOR_MISSING_DETERMINER_AN)
169-172: Align tone and fix typo ingetClaimsection
- Use imperative present tense for consistency with other function docs (e.g., “Get a claim…” rather than “Gets a claim…”).
- Correct typo “Acessing” → “Accessing”.
- Gets a claim from an access or ID token. + Get a claim from an access or ID token. - // Acessing custom claims + // Accessing custom claimsAlso applies to: 190-193
196-199: Clarify and punctuategetCurrentOrganizationdescription- Returns the current users logged in organization code. + Returns the current user’s logged-in organization code.🧰 Tools
🪛 LanguageTool
[uncategorized] ~198-~198: A punctuation mark might be missing here.
Context: ...rrentOrganization` Returns the current users logged in organization code. ```typesc...(AI_EN_LECTOR_MISSING_PUNCTUATION)
251-254: Update permission docs to reference permissions instead of feature flags
ThegetPermissionsection currently refers to “feature flag” in its description and examples. It should mention “permission” consistently:- Get the value of a feature flag. + Get the value of a permission. - // Get the feature flag value + // Get the permission valueAlso applies to: 261-265
329-333: Correct variable naming ingetUserProfileexample
The example assigns the profile to a variable namedroles. Consider renaming toprofilefor clarity:- // Get the feature flag value - const roles = await getUserProfile(); + // Get the user profile + const profile = await getUserProfile();Also applies to: 335-342
350-362: Avoid shadowingrefreshTokenfunction in example
Rename the result variable to prevent shadowing the function name, e.g.:- const refreshToken = await refreshToken({ /* ... */ }); + const refreshResult = await refreshToken({ /* ... */ });Also applies to: 366-374
381-385: Fix missing article and tone in caching steps- Make sure you have changed values in `.env` file. + Make sure you have changed values in the `.env` file. - Trying to install packages again: `yarn install` or `npm install`. + Install packages again: `yarn install` or `npm install`.🧰 Tools
🪛 LanguageTool
[uncategorized] ~385-~385: You might be missing the article “the” here.
Context: ...3. Make sure you have changed values in.envfile. 4. Trying to install package...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/components/TokenUtils.astro(1 hunks)src/content/docs/developer-tools/about/our-sdks.mdx(1 hunks)src/content/docs/developer-tools/sdks/native/expo-react-native.mdx(0 hunks)src/content/docs/developer-tools/sdks/native/expo.mdx(1 hunks)src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx(1 hunks)src/data/sdkList.ts(1 hunks)src/data/tokenUtils.ts(1 hunks)
💤 Files with no reviewable changes (1)
- src/content/docs/developer-tools/sdks/native/expo-react-native.mdx
✅ Files skipped from review due to trivial changes (5)
- src/content/docs/developer-tools/about/our-sdks.mdx
- src/data/sdkList.ts
- src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx
- src/data/tokenUtils.ts
- src/components/TokenUtils.astro
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/native/expo.mdx
[uncategorized] ~90-~90: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...
(AI_EN_LECTOR_MISSING_DETERMINER_AN)
[uncategorized] ~198-~198: A punctuation mark might be missing here.
Context: ...rrentOrganization` Returns the current users logged in organization code. ```typesc...
(AI_EN_LECTOR_MISSING_PUNCTUATION)
[uncategorized] ~213-~213: A punctuation mark might be missing here.
Context: ...UserOrganizations` Returns the current users logged in organization code. ```typesc...
(AI_EN_LECTOR_MISSING_PUNCTUATION)
[grammar] ~275-~275: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...rent user for the organization they are signed into. ```typescript getPermissions = async ...
(SIGN_INTO)
[uncategorized] ~304-~304: It looks like there might be a possessive apostrophe missing. Consider inserting it.
Context: .../ ] // } ``` ### getRoles Get the users Roles
(AI_EN_LECTOR_MISSING_NOUN_POSSESSIVE)
[uncategorized] ~385-~385: You might be missing the article “the” here.
Context: ...3. Make sure you have changed values in .env file. 4. Trying to install package...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🪛 Gitleaks (8.21.2)
src/content/docs/developer-tools/sdks/native/expo.mdx
371-371: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
372-372: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
373-373: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🔇 Additional comments (3)
src/content/docs/developer-tools/sdks/native/expo.mdx (3)
1-15: Frontmatter looks good
The page metadata (ID, title, sidebar order, related articles, and Open Graph image) is well-formed and consistent with our documentation standards.
21-22: No comments—these sections (Register, Before you install, Installation snippet, Auth Methods snippet, Example usage, initial Token utilities heading, import snippet, bullet list of utilities, Properties, Kinde configuration, getDecodedToken, Android/iOS cache commands, and contact info) follow our existing patterns and require no changes.Also applies to: 23-28, 29-34, 57-78, 82-86, 96-98, 100-108, 110-127, 128-136, 146-154, 391-399, 403-409, 411-414
273-281: Improve language and verifygetPermissionssignature
- Change “signed into” to “logged in to” or similar:
- Get the permissions for the current user for the organization they are signed into. + Get the permissions for the current user in their current organization.- The signature shown (
getPermissions = async <T = string>(permissionKey: T): Promise<PermissionAccess>) may not match the intended function (which typically returns all permissions without a parameter). Please confirm against the source code.🧰 Tools
🪛 LanguageTool
[grammar] ~275-~275: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...rent user for the organization they are signed into. ```typescript getPermissions = async ...(SIGN_INTO)
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (8)
src/content/docs/developer-tools/sdks/native/expo.mdx (8)
11-15: Update Open Graph image to reflect Expo.
Theog:imagecurrently points to a React Native SDK graphic. Consider updating it to an Expo-specific image so social previews accurately represent this guide.
17-18: Clarify SDK audience.
The sentence “This SDK is for people using Expo.” could be more descriptive. For example:This SDK is intended specifically for developers using Expo.
88-90: Add missing article in logout description.
ChangeLogout accepts object which allows you to revoke the tokento
Logout accepts an object which allows you to revoke the token🧰 Tools
🪛 LanguageTool
[uncategorized] ~90-~90: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...(AI_EN_LECTOR_MISSING_DETERMINER_AN)
193-199: Fix possessive apostrophe ingetCurrentOrganizationdescription.
ChangeReturns the current users logged in organization code.to
Returns the current user's logged in organization code.🧰 Tools
🪛 LanguageTool
[uncategorized] ~195-~195: A punctuation mark might be missing here.
Context: ...rrentOrganization` Returns the current users logged in organization code. ```typesc...(AI_EN_LECTOR_MISSING_PUNCTUATION)
272-274: Correct “signed into” phrasing.
InGet the permissions for the current user for the organization they are signed into.use a clearer form, e.g.:
Get the permissions for the current user for the organization they are logged in to.🧰 Tools
🪛 LanguageTool
[grammar] ~274-~274: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...rent user for the organization they are signed into. ```typescript getPermissions = async ...(SIGN_INTO)
301-303: Fix heading grammar forgetRoles.
ChangeGet the users Rolesto
Get the user’s roles(lowercase “roles” and include the apostrophe)
🧰 Tools
🪛 LanguageTool
[uncategorized] ~303-~303: It looks like there might be a possessive apostrophe missing. Consider inserting it.
Note: Roles are opti...
Context: .../ ] // } ``` ###getRolesGet the users Roles(AI_EN_LECTOR_MISSING_NOUN_POSSESSIVE)
382-384: Add article in cache cleanup instruction.
UpdateMake sure you have changed values in `.env` file.to
Make sure you have changed the values in the `.env` file.🧰 Tools
🪛 LanguageTool
[uncategorized] ~384-~384: You might be missing the article “the” here.
Context: ...3. Make sure you have changed values in.envfile. 4. Trying to install package...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
369-372: Clarify placeholder token values.
The example shows real-looking JWT strings. Add a note that these are placeholders only, for example purposes:<!-- Note: The token strings shown above are mock values for illustration only. -->🧰 Tools
🪛 Gitleaks (8.21.2)
370-370: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
371-371: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
372-372: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/content/docs/developer-tools/sdks/native/expo.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/native/expo.mdx
[uncategorized] ~90-~90: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...
(AI_EN_LECTOR_MISSING_DETERMINER_AN)
[uncategorized] ~195-~195: A punctuation mark might be missing here.
Context: ...rrentOrganization` Returns the current users logged in organization code. ```typesc...
(AI_EN_LECTOR_MISSING_PUNCTUATION)
[grammar] ~274-~274: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...rent user for the organization they are signed into. ```typescript getPermissions = async ...
(SIGN_INTO)
[uncategorized] ~303-~303: It looks like there might be a possessive apostrophe missing. Consider inserting it.
Context: .../ ] // } ``` ### getRoles Get the users Roles
(AI_EN_LECTOR_MISSING_NOUN_POSSESSIVE)
[uncategorized] ~384-~384: You might be missing the article “the” here.
Context: ...3. Make sure you have changed values in .env file. 4. Trying to install package...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🪛 Gitleaks (8.21.2)
src/content/docs/developer-tools/sdks/native/expo.mdx
370-370: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
371-371: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
372-372: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (7)
src/content/docs/developer-tools/sdks/native/expo.mdx (7)
90-92: Grammar: Add missing article- Logout accepts object which allows you to revoke the token + Logout accepts an object which allows you to revoke the token🧰 Tools
🪛 LanguageTool
[uncategorized] ~92-~92: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...(AI_EN_LECTOR_MISSING_DETERMINER_AN)
195-198: Grammar: Add possessive apostrophe and hyphenation### `getCurrentOrganization` - Returns the current users logged in organization code. + Returns the current user's logged-in organization code.🧰 Tools
🪛 LanguageTool
[uncategorized] ~197-~197: A punctuation mark might be missing here.
Context: ...rrentOrganization` Returns the current users logged in organization code. ```typesc...(AI_EN_LECTOR_MISSING_PUNCTUATION)
252-255: ClarifygetPermissiondescription
The description currently mentions “feature flag” instead of permissions. Consider:### `getPermission` - Get the value of a feature flag. + Get a single permission value for the specified key.
274-278: Grammar: Correct “signed in to”### `getPermissions` - Get the permissions for the current user for the organization they are signed into. + Get the permissions for the current user for the organization they are signed in to.🧰 Tools
🪛 LanguageTool
[grammar] ~276-~276: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...rent user for the organization they are signed into. ```typescript getPermissions = async ...(SIGN_INTO)
303-306: Grammar: Fix heading and apostrophe- ### `getRoles` - Get the users Roles + ### `getRoles` + Get the user's roles🧰 Tools
🪛 LanguageTool
[uncategorized] ~305-~305: It looks like there might be a possessive apostrophe missing. Consider inserting it.
Note: Roles are opti...
Context: .../ ] // } ``` ###getRolesGet the users Roles(AI_EN_LECTOR_MISSING_NOUN_POSSESSIVE)
379-382: Heading level: Promote “Caching Issues” to H2
This section is top-level content, not a sub-section of token utilities. Change:- ### **Caching Issues** + ## Caching Issues
384-387: Grammar: Clarify.envfile instruction- 3. Make sure you have changed values in `.env` file. + 3. Make sure you have updated the values in your `.env` file.🧰 Tools
🪛 LanguageTool
[uncategorized] ~386-~386: You might be missing the article “the” here.
Context: ...3. Make sure you have changed values in.envfile. 4. Trying to install package...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/content/docs/developer-tools/sdks/native/expo.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/native/expo.mdx
[uncategorized] ~92-~92: You might be missing the article “an” here.
Context: ...k/#request-parameters). Logout accepts object which allows you to revoke the token `...
(AI_EN_LECTOR_MISSING_DETERMINER_AN)
[uncategorized] ~197-~197: A punctuation mark might be missing here.
Context: ...rrentOrganization` Returns the current users logged in organization code. ```typesc...
(AI_EN_LECTOR_MISSING_PUNCTUATION)
[grammar] ~276-~276: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...rent user for the organization they are signed into. ```typescript getPermissions = async ...
(SIGN_INTO)
[uncategorized] ~305-~305: It looks like there might be a possessive apostrophe missing. Consider inserting it.
Context: .../ ] // } ``` ### getRoles Get the users Roles
(AI_EN_LECTOR_MISSING_NOUN_POSSESSIVE)
[uncategorized] ~386-~386: You might be missing the article “the” here.
Context: ...3. Make sure you have changed values in .env file. 4. Trying to install package...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🪛 Gitleaks (8.21.2)
src/content/docs/developer-tools/sdks/native/expo.mdx
372-372: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
373-373: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
374-374: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🔇 Additional comments (1)
src/content/docs/developer-tools/sdks/native/expo.mdx (1)
116-119: Inconsistent with AI summary: TokenUtils component not used
The summary indicates that token utilities are rendered via<TokenUtils>andtokenUtilsDocumentation, but this MDX still manually lists them. Please either import and use the shared<TokenUtils>component or update the summary to match the current content.Likely an incorrect or invalid review comment.
| ## Installation with Expo Managed Workflow | ||
|
|
||
| ### Install package | ||
|
|
||
| <PackageManagers pkg="@kinde/expo" /> | ||
|
|
||
| ### Setup provider |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Missing import for <PackageManagers> component
The MDX uses <PackageManagers pkg="@kinde/expo" /> at line 33 but there’s no corresponding import. Please add:
import PackageManagers from 'src/components/PackageManagers.astro';|
Good from me @DanielRivers looks like coderabbit has a couple of comments to consider :) |
Description (required)
Adds the Expo guide
Related issues & labels (optional)
Summary by CodeRabbit