Skip to content

Commit

Permalink
Update @workos-inc/authkit-js to latest version (#27)
Browse files Browse the repository at this point in the history
* Bump version of `@workos-inc/authkit-js`

* Pass through `refreshBufferInterval`
  • Loading branch information
mthadley authored Oct 28, 2024
1 parent af3f913 commit b1d8fe8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"react": ">=17"
},
"dependencies": {
"@workos-inc/authkit-js": "0.5"
"@workos-inc/authkit-js": "0.6"
}
}
4 changes: 3 additions & 1 deletion src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function AuthKitProvider(props: AuthKitProviderProps) {
redirectUri,
children,
onRedirectCallback,
refreshBufferInterval,
} = props;
const [client, setClient] = React.useState<Client>(NOOP_CLIENT);
const [state, setState] = React.useState(initialState);
Expand Down Expand Up @@ -58,6 +59,7 @@ export function AuthKitProvider(props: AuthKitProviderProps) {
devMode,
onRedirectCallback,
onRefresh,
refreshBufferInterval,
}).then(async (client) => {
const user = client.getUser();
setClient(client);
Expand All @@ -74,7 +76,7 @@ export function AuthKitProvider(props: AuthKitProviderProps) {
setState(initialState);

return initialize();
}, [clientId, apiHostname, https, port, redirectUri]);
}, [clientId, apiHostname, https, port, redirectUri, refreshBufferInterval]);

return (
<Context.Provider value={{ ...client, ...state }}>
Expand Down

0 comments on commit b1d8fe8

Please sign in to comment.