@workos-inc/authkit-react
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -117,2 +117,4 @@ "use strict"; | ||
children, | ||
onRefresh, | ||
onRefreshFailure, | ||
onRedirectCallback, | ||
@@ -123,4 +125,5 @@ refreshBufferInterval | ||
const [state, setState] = React3.useState(initialState); | ||
const onRefresh = React3.useCallback( | ||
({ user, accessToken, organizationId }) => { | ||
const handleRefresh = React3.useCallback( | ||
(response) => { | ||
const { user, accessToken, organizationId } = response; | ||
const { role = null, permissions = [] } = (0, import_authkit_js.getClaims)(accessToken); | ||
@@ -136,2 +139,3 @@ setState((prev) => { | ||
}); | ||
onRefresh == null ? void 0 : onRefresh(response); | ||
}, | ||
@@ -150,3 +154,4 @@ [client] | ||
onRedirectCallback, | ||
onRefresh, | ||
onRefresh: handleRefresh, | ||
onRefreshFailure, | ||
refreshBufferInterval | ||
@@ -153,0 +158,0 @@ }).then((client2) => __async(this, null, function* () { |
{ | ||
"name": "@workos-inc/authkit-react", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "AuthKit React SDK", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
37608
532