@logto/react 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,6 +95,7 @@ const useLogto = () => {
95
95
  // Moreover, since the location will be redirected, the isAuthenticated state will not matter any more.
96
96
  signOut: proxy(client.signOut.bind(client)),
97
97
  fetchUserInfo: proxy(client.fetchUserInfo.bind(client)),
98
+ clearAccessToken: proxy(client.clearAccessToken.bind(client)),
98
99
  }), [client, proxy]);
99
100
  return {
100
101
  isAuthenticated,
@@ -7,7 +7,7 @@ type Logto = {
7
7
  isAuthenticated: boolean;
8
8
  isLoading: boolean;
9
9
  error?: Error;
10
- } & OptionalPromiseReturn<Pick<LogtoClient, 'getRefreshToken' | 'getAccessToken' | 'getAccessTokenClaims' | 'getOrganizationToken' | 'getOrganizationTokenClaims' | 'getIdToken' | 'getIdTokenClaims' | 'signOut' | 'fetchUserInfo'>> & Pick<LogtoClient, 'signIn'>;
10
+ } & OptionalPromiseReturn<Pick<LogtoClient, 'getRefreshToken' | 'getAccessToken' | 'getAccessTokenClaims' | 'getOrganizationToken' | 'getOrganizationTokenClaims' | 'getIdToken' | 'getIdTokenClaims' | 'signOut' | 'fetchUserInfo' | 'clearAccessToken'>> & Pick<LogtoClient, 'signIn'>;
11
11
  declare const useHandleSignInCallback: (callback?: () => void) => {
12
12
  isLoading: boolean;
13
13
  isAuthenticated: boolean;
@@ -93,6 +93,7 @@ const useLogto = () => {
93
93
  // Moreover, since the location will be redirected, the isAuthenticated state will not matter any more.
94
94
  signOut: proxy(client.signOut.bind(client)),
95
95
  fetchUserInfo: proxy(client.fetchUserInfo.bind(client)),
96
+ clearAccessToken: proxy(client.clearAccessToken.bind(client)),
96
97
  }), [client, proxy]);
97
98
  return {
98
99
  isAuthenticated,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/react",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "type": "module",
5
5
  "main": "./lib/index.cjs",
6
6
  "module": "./lib/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@silverhand/essentials": "^2.8.7",
25
- "@logto/browser": "^2.2.8"
25
+ "@logto/browser": "^2.2.9"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@silverhand/eslint-config": "^5.0.0",