@logto/react 3.0.2 → 3.0.3
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.
- package/lib/hooks/index.cjs +1 -0
- package/lib/hooks/index.d.ts +1 -1
- package/lib/hooks/index.js +1 -0
- package/package.json +2 -2
package/lib/hooks/index.cjs
CHANGED
|
@@ -87,6 +87,7 @@ const useLogto = () => {
|
|
|
87
87
|
getOrganizationTokenClaims: proxy(client.getOrganizationTokenClaims.bind(client)),
|
|
88
88
|
getIdToken: proxy(client.getIdToken.bind(client)),
|
|
89
89
|
getIdTokenClaims: proxy(client.getIdTokenClaims.bind(client)),
|
|
90
|
+
// eslint-disable-next-line no-restricted-syntax -- TypeScript cannot infer the correct type.
|
|
90
91
|
signIn: proxy(client.signIn.bind(client), false),
|
|
91
92
|
// We deliberately do NOT set isAuthenticated to false in the function below, because the app state
|
|
92
93
|
// may change immediately even before navigating to the oidc end session endpoint, which might cause
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -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' | '
|
|
10
|
+
} & OptionalPromiseReturn<Pick<LogtoClient, 'getRefreshToken' | 'getAccessToken' | 'getAccessTokenClaims' | 'getOrganizationToken' | 'getOrganizationTokenClaims' | 'getIdToken' | 'getIdTokenClaims' | 'signOut' | 'fetchUserInfo'>> & Pick<LogtoClient, 'signIn'>;
|
|
11
11
|
declare const useHandleSignInCallback: (callback?: () => void) => {
|
|
12
12
|
isLoading: boolean;
|
|
13
13
|
isAuthenticated: boolean;
|
package/lib/hooks/index.js
CHANGED
|
@@ -85,6 +85,7 @@ const useLogto = () => {
|
|
|
85
85
|
getOrganizationTokenClaims: proxy(client.getOrganizationTokenClaims.bind(client)),
|
|
86
86
|
getIdToken: proxy(client.getIdToken.bind(client)),
|
|
87
87
|
getIdTokenClaims: proxy(client.getIdTokenClaims.bind(client)),
|
|
88
|
+
// eslint-disable-next-line no-restricted-syntax -- TypeScript cannot infer the correct type.
|
|
88
89
|
signIn: proxy(client.signIn.bind(client), false),
|
|
89
90
|
// We deliberately do NOT set isAuthenticated to false in the function below, because the app state
|
|
90
91
|
// may change immediately even before navigating to the oidc end session endpoint, which might cause
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
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.
|
|
25
|
+
"@logto/browser": "^2.2.5"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@silverhand/eslint-config": "^5.0.0",
|