@logto/vue 2.2.7 → 2.2.8
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/index.d.ts +1 -1
- package/lib/plugin.cjs +1 -0
- package/lib/plugin.d.ts +1 -0
- package/lib/plugin.js +1 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ type Logto = {
|
|
|
14
14
|
isAuthenticated: Readonly<Ref<boolean>>;
|
|
15
15
|
isLoading: Readonly<Ref<boolean>>;
|
|
16
16
|
error: Readonly<Ref<Error | undefined>>;
|
|
17
|
-
} & OptionalPromiseReturn<Pick<LogtoClient, 'getRefreshToken' | 'getAccessToken' | 'getAccessTokenClaims' | 'getOrganizationToken' | 'getOrganizationTokenClaims' | 'getIdToken' | 'getIdTokenClaims' | 'signIn' | 'signOut' | 'fetchUserInfo'>>;
|
|
17
|
+
} & OptionalPromiseReturn<Pick<LogtoClient, 'getRefreshToken' | 'getAccessToken' | 'getAccessTokenClaims' | 'getOrganizationToken' | 'getOrganizationTokenClaims' | 'getIdToken' | 'getIdTokenClaims' | 'signIn' | 'signOut' | 'fetchUserInfo' | 'clearAccessToken'>>;
|
|
18
18
|
/**
|
|
19
19
|
* Creates the Logto Vue plugin
|
|
20
20
|
*
|
package/lib/plugin.cjs
CHANGED
|
@@ -36,6 +36,7 @@ const createPluginMethods = (context$1) => {
|
|
|
36
36
|
// Moreover, since the location will be redirected, the isAuthenticated state will not matter any more.
|
|
37
37
|
signOut: proxy(client.signOut.bind(client)),
|
|
38
38
|
fetchUserInfo: proxy(client.fetchUserInfo.bind(client)),
|
|
39
|
+
clearAccessToken: proxy(client.clearAccessToken.bind(client)),
|
|
39
40
|
};
|
|
40
41
|
const handleSignInCallback = async (callbackUri, callbackFunction) => {
|
|
41
42
|
if (!logtoClient.value) {
|
package/lib/plugin.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export declare const createPluginMethods: (context: Context) => {
|
|
|
12
12
|
signIn: (redirectUri: string | URL, interactionMode?: import("@logto/browser").InteractionMode | undefined, loginHint?: string | undefined) => Promise<Optional<void>>;
|
|
13
13
|
signOut: (postLogoutRedirectUri?: string | undefined) => Promise<Optional<void>>;
|
|
14
14
|
fetchUserInfo: () => Promise<Optional<import("@logto/browser").UserInfoResponse>>;
|
|
15
|
+
clearAccessToken: () => Promise<Optional<void>>;
|
|
15
16
|
};
|
package/lib/plugin.js
CHANGED
|
@@ -34,6 +34,7 @@ const createPluginMethods = (context) => {
|
|
|
34
34
|
// Moreover, since the location will be redirected, the isAuthenticated state will not matter any more.
|
|
35
35
|
signOut: proxy(client.signOut.bind(client)),
|
|
36
36
|
fetchUserInfo: proxy(client.fetchUserInfo.bind(client)),
|
|
37
|
+
clearAccessToken: proxy(client.clearAccessToken.bind(client)),
|
|
37
38
|
};
|
|
38
39
|
const handleSignInCallback = async (callbackUri, callbackFunction) => {
|
|
39
40
|
if (!logtoClient.value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/vue",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.8",
|
|
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.9"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@silverhand/eslint-config": "^5.0.0",
|