@workos-inc/authkit-react
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -5,3 +5,3 @@ import { createClient, User } from '@workos-inc/authkit-js'; | ||
type Client = Awaited<ReturnType<typeof createClient>>; | ||
type Client = Pick<Awaited<ReturnType<typeof createClient>>, "signIn" | "signUp" | "getUser" | "getAccessToken" | "signOut" | "switchToOrganization">; | ||
type CreateClientOptions = NonNullable<Parameters<typeof createClient>[1]>; | ||
@@ -8,0 +8,0 @@ |
@@ -151,3 +151,10 @@ "use strict"; | ||
const user = client2.getUser(); | ||
setClient(client2); | ||
setClient({ | ||
getAccessToken: client2.getAccessToken.bind(client2), | ||
getUser: client2.getUser.bind(client2), | ||
signIn: client2.signIn.bind(client2), | ||
signUp: client2.signUp.bind(client2), | ||
signOut: client2.signOut.bind(client2), | ||
switchToOrganization: client2.switchToOrganization.bind(client2) | ||
}); | ||
setState((prev) => __spreadProps(__spreadValues({}, prev), { isLoading: false, user })); | ||
@@ -177,2 +184,3 @@ })); | ||
getAccessToken: () => Promise.reject(new import_authkit_js.LoginRequiredError()), | ||
switchToOrganization: () => Promise.resolve(), | ||
signOut: () => { | ||
@@ -179,0 +187,0 @@ } |
{ | ||
"name": "@workos-inc/authkit-react", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "AuthKit React SDK", | ||
@@ -40,4 +40,4 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@workos-inc/authkit-js": "0.6.1" | ||
"@workos-inc/authkit-js": "0.7.0" | ||
} | ||
} |
@@ -112,2 +112,3 @@ # AuthKit React Library | ||
- `signOut`: Ends the session. | ||
- `switchToOrganization`: Switches to the given organization. Redirects to the hosted login page if switch is unsuccessful. | ||
@@ -114,0 +115,0 @@ The following claims may be populated if the user is part of an organization: |
import { createClient } from "@workos-inc/authkit-js"; | ||
export type Client = Awaited<ReturnType<typeof createClient>>; | ||
export type Client = Pick< | ||
Awaited<ReturnType<typeof createClient>>, | ||
| "signIn" | ||
| "signUp" | ||
| "getUser" | ||
| "getAccessToken" | ||
| "signOut" | ||
| "switchToOrganization" | ||
>; | ||
export type CreateClientOptions = NonNullable< | ||
Parameters<typeof createClient>[1] | ||
>; |
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
Sorry, the diff of this file is not supported yet
36692
517
123
+ Added@workos-inc/authkit-js@0.7.0(transitive)
- Removed@workos-inc/authkit-js@0.6.1(transitive)
Updated@workos-inc/authkit-js@0.7.0