Skip to content

Commit 2050853

Browse files
committed
refactor: feedback updates
1 parent d8fb3b9 commit 2050853

File tree

1 file changed

+24
-25
lines changed
  • src/content/docs/developer-tools/sdks/native

1 file changed

+24
-25
lines changed

src/content/docs/developer-tools/sdks/native/expo.mdx

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,25 @@ Logout accepts object which allows you to revoke the token
9393
kinde.logout({ revokeToken: true })
9494
```
9595

96-
### Token utilities
96+
#### Properties (Only available from `useKindeAuth`)
97+
98+
- `isAuthenticated` - Returns true/false if the user is authenticated
99+
100+
## Kinde configuration
101+
102+
1. In Kinde, go to **Settings > Applications.**
103+
2. Select **View details** on the **Frontend app**.
104+
3. Scroll down to the **Callback URLs** section.
105+
4. Add in the callback URLs for your React Native app, which should look something like this:
106+
- Allowed callback URLs - `<myapp://localhost:3000>`
107+
- Allowed logout redirect URLs - `<myapp://localhost:3000>`
108+
109+
110+
Make sure you press the Save button at the bottom of the page!
111+
112+
Note: The `<myapp://localhost:3000>` is used as an example of local URL Scheme, change to the local URL Scheme or production URL Scheme that you use.
113+
114+
## Token Utilities
97115

98116
All utility functions from `@kinde/js-utils` are available through `@kinde/expo/utils` and also through the `useKindeAuth` hook. This allows you to use these utilities directly in your Expo application.
99117

@@ -121,27 +139,6 @@ const checkUserProfile = async () => {
121139
- `getClaims` - Get all claims from the token
122140
- `refreshToken` - Manually refresh the access token
123141

124-
#### Properties (Only available from `useKindeAuth`)
125-
126-
- `isAuthenticated` - Returns true/false if the user is authenticated
127-
128-
## Kinde configuration
129-
130-
1. In Kinde, go to **Settings > Applications.**
131-
2. Select **View details** on the **Frontend app**.
132-
3. Scroll down to the **Callback URLs** section.
133-
4. Add in the callback URLs for your React Native app, which should look something like this:
134-
- Allowed callback URLs - `<myapp://localhost:3000>`
135-
- Allowed logout redirect URLs - `<myapp://localhost:3000>`
136-
137-
138-
Make sure you press the Save button at the bottom of the page!
139-
140-
Note: The `<myapp://localhost:3000>` is used as an example of local URL Scheme, change to the local URL Scheme or production URL Scheme that you use.
141-
142-
## Token Utilities
143-
144-
testing
145142

146143
### `getDecodedToken`
147144

@@ -210,7 +207,7 @@ const orgCode = await getCurrentOrganization();
210207

211208
### `getUserOrganizations`
212209

213-
Returns the current users logged in organization code.
210+
Returns all organization codes the current user belongs to.
214211

215212
```typescript
216213
getUserOrganizations = async (): Promise<string[] | null>
@@ -233,7 +230,9 @@ const orgCode = await getUserOrganizations();
233230
Get the value of a feature flag.
234231

235232
```typescript
236-
getFlag = async (): Promise<string | null>
233+
getFlag = async <T = string | boolean | number | object>(
234+
name: string,
235+
): Promise<T | null>
237236
```
238237

239238
Example usage:
@@ -314,7 +313,7 @@ getRoles = async (): Promise<Role[]>
314313
Example usage:
315314
```javascript
316315
// Get the feature flag value
317-
const roles = await getRoles("feature_flag_name");
316+
const roles = await getRoles();
318317
// [
319318
// {
320319
// id: "01932730-c828-c01c-9f5d-c8f15be13e24",

0 commit comments

Comments
 (0)