diff --git a/package-lock.json b/package-lock.json index d085f3b..636f075 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@workos-inc/authkit-react", - "version": "0.7.1", + "version": "0.7.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@workos-inc/authkit-react", - "version": "0.7.1", + "version": "0.7.2", "license": "MIT", "dependencies": { - "@workos-inc/authkit-js": "0.7.1" + "@workos-inc/authkit-js": "0.8.0" }, "devDependencies": { "@types/react": "18.3.3", @@ -794,9 +794,9 @@ } }, "node_modules/@workos-inc/authkit-js": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@workos-inc/authkit-js/-/authkit-js-0.7.1.tgz", - "integrity": "sha512-tI3ubreO0Q72sgzOkH61fFTitJqiRH3nrZpao3BPZlI4FoQFBUVrsnk16N0DZVK+mR+ldzkjNWaxjLKJlC6hjQ==" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@workos-inc/authkit-js/-/authkit-js-0.8.0.tgz", + "integrity": "sha512-Ja/fQsYenHHktIq5KmD6hxDWxN0HmhkcDRkX8W6b6qLfhx0zYpsw3HASEsow2AXV8UVSLy6H8D0Fi4PGmTslLg==" }, "node_modules/acorn": { "version": "8.12.1", diff --git a/package.json b/package.json index d11449b..de5b0c2 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,6 @@ "react": ">=17" }, "dependencies": { - "@workos-inc/authkit-js": "0.7.1" + "@workos-inc/authkit-js": "0.8.0" } } diff --git a/src/provider.tsx b/src/provider.tsx index 66cf5c1..743b794 100644 --- a/src/provider.tsx +++ b/src/provider.tsx @@ -2,10 +2,10 @@ import * as React from "react"; import { - AuthenticationResponse, createClient, getClaims, LoginRequiredError, + OnRefreshResponse, } from "@workos-inc/authkit-js"; import { Context } from "./context"; import { Client, CreateClientOptions } from "./types"; @@ -34,7 +34,7 @@ export function AuthKitProvider(props: AuthKitProviderProps) { const [state, setState] = React.useState(initialState); const handleRefresh = React.useCallback( - (response: AuthenticationResponse) => { + (response: OnRefreshResponse) => { const { user, accessToken, organizationId } = response; const { role = null, permissions = [] } = getClaims(accessToken); setState((prev) => {