@@ -93,7 +93,25 @@ Logout accepts object which allows you to revoke the token
93
93
kinde .logout ({ revokeToken: true })
94
94
```
95
95
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
97
115
98
116
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.
99
117
@@ -121,27 +139,6 @@ const checkUserProfile = async () => {
121
139
- ` getClaims ` - Get all claims from the token
122
140
- ` refreshToken ` - Manually refresh the access token
123
141
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
145
142
146
143
### ` getDecodedToken `
147
144
@@ -210,7 +207,7 @@ const orgCode = await getCurrentOrganization();
210
207
211
208
### ` getUserOrganizations `
212
209
213
- Returns the current users logged in organization code .
210
+ Returns all organization codes the current user belongs to .
214
211
215
212
``` typescript
216
213
getUserOrganizations = async (): Promise <string [] | null >
@@ -233,7 +230,9 @@ const orgCode = await getUserOrganizations();
233
230
Get the value of a feature flag.
234
231
235
232
``` typescript
236
- getFlag = async (): Promise <string | null >
233
+ getFlag = async <T = string | boolean | number | object >(
234
+ name : string ,
235
+ ): Promise < T | null >
237
236
```
238
237
239
238
Example usage:
@@ -314,7 +313,7 @@ getRoles = async (): Promise<Role[]>
314
313
Example usage:
315
314
` ` ` javascript
316
315
// Get the feature flag value
317
- const roles = await getRoles (" feature_flag_name " );
316
+ const roles = await getRoles ();
318
317
// [
319
318
// {
320
319
// id: "01932730-c828-c01c-9f5d-c8f15be13e24",
0 commit comments