Skip to content

Commit 0d2bc9e

Browse files
committed
docs(): updated README on Reactive State
1 parent 9b76cb0 commit 0d2bc9e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ const {
206206
isAuthenticated,
207207
isPending,
208208
hasFailed,
209+
error,
209210
token,
210211
decodedToken,
211212
username,
@@ -222,16 +223,17 @@ const {
222223

223224
| State | Type | Description |
224225
| --------------- | ------------------------------------------------------ | ------------------------------------------------------------------- |
225-
| keycloak | `Ref<`[`Keycloak`][Instance]`>` | Instance of the keycloak-js adapter. |
226+
| keycloak | `ShallowRef<`[`Keycloak`][Instance]`>` | Instance of the keycloak-js adapter. |
226227
| isAuthenticated | `Ref<boolean>` | If `true` the user is authenticated. |
227228
| isPending | `Ref<boolean>` | If `true` the authentication request is still pending. |
228-
| hasFailed | `Ref<boolean>` | If `true` authentication request has failed. |
229+
| hasFailed | `Ref<boolean>` | If `true` an error ocurred on initialization or Keycloak request. |
230+
| error | `ShallowRef<Error>` | Info on error that ocurred (null if no error) |
229231
| token | `Ref<string>` | Raw value of the access token. |
230-
| decodedToken | `Ref<`[`KeycloakTokenParsed`][TokenParsed]`>` | Decoded value of the access token. |
232+
| decodedToken | `ShallowRef<`[`KeycloakTokenParsed`][TokenParsed]`>` | Decoded value of the access token. |
231233
| username | `Ref<string>` | Username. Extracted from `decodedToken['preferred_username']`. |
232234
| userId | `Ref<string>` | User identifier. Extracted from `decodedToken['sub']`. |
233-
| roles | `Ref<string[]>` | List of the user's roles. |
234-
| resourceRoles | `Ref<Record<string, string[]>` | List of the user's roles in specific resources. |
235+
| roles | `ShallowRef<string[]>` | List of the user's roles. |
236+
| resourceRoles | `ShallowRef<Record<string, string[]>` | List of the user's roles in specific resources. |
235237

236238
#### Functions
237239

0 commit comments

Comments
 (0)