@logto/vue 2.2.14 → 2.2.15
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 +5 -1
- 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' | '
|
|
17
|
+
} & OptionalPromiseReturn<Pick<LogtoClient, 'getRefreshToken' | 'getAccessToken' | 'getAccessTokenClaims' | 'getOrganizationToken' | 'getOrganizationTokenClaims' | 'getIdToken' | 'getIdTokenClaims' | 'signOut' | 'fetchUserInfo' | 'clearAccessToken' | 'clearAllTokens'>> & Pick<LogtoClient, 'signIn'>;
|
|
18
18
|
/**
|
|
19
19
|
* Creates the Logto Vue plugin
|
|
20
20
|
*
|
package/lib/plugin.cjs
CHANGED
|
@@ -29,6 +29,7 @@ const createPluginMethods = (context$1) => {
|
|
|
29
29
|
getOrganizationTokenClaims: proxy(client.getOrganizationTokenClaims.bind(client)),
|
|
30
30
|
getIdToken: proxy(client.getIdToken.bind(client)),
|
|
31
31
|
getIdTokenClaims: proxy(client.getIdTokenClaims.bind(client)),
|
|
32
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
32
33
|
signIn: proxy(client.signIn.bind(client), false),
|
|
33
34
|
// We deliberately do NOT set isAuthenticated to false in the function below, because the app state
|
|
34
35
|
// may change immediately even before navigating to the oidc end session endpoint, which might cause
|
package/lib/plugin.d.ts
CHANGED
|
@@ -9,7 +9,11 @@ export declare const createPluginMethods: (context: Context) => {
|
|
|
9
9
|
getOrganizationTokenClaims: (organizationId: string) => Promise<Optional<import("@logto/browser").AccessTokenClaims>>;
|
|
10
10
|
getIdToken: () => Promise<Optional<import("@silverhand/essentials").Nullable<string>>>;
|
|
11
11
|
getIdTokenClaims: () => Promise<Optional<import("@logto/browser").IdTokenClaims>>;
|
|
12
|
-
signIn:
|
|
12
|
+
signIn: {
|
|
13
|
+
(options: import("@logto/browser").SignInOptions): Promise<void>;
|
|
14
|
+
(redirectUri: string | URL): Promise<void>;
|
|
15
|
+
(redirectUri: string | URL, interactionMode?: import("@logto/browser").InteractionMode | undefined, loginHint?: string | undefined): Promise<void>;
|
|
16
|
+
};
|
|
13
17
|
signOut: (postLogoutRedirectUri?: string | undefined) => Promise<Optional<void>>;
|
|
14
18
|
fetchUserInfo: () => Promise<Optional<import("@logto/browser").UserInfoResponse>>;
|
|
15
19
|
clearAccessToken: () => Promise<Optional<void>>;
|
package/lib/plugin.js
CHANGED
|
@@ -27,6 +27,7 @@ const createPluginMethods = (context) => {
|
|
|
27
27
|
getOrganizationTokenClaims: proxy(client.getOrganizationTokenClaims.bind(client)),
|
|
28
28
|
getIdToken: proxy(client.getIdToken.bind(client)),
|
|
29
29
|
getIdTokenClaims: proxy(client.getIdTokenClaims.bind(client)),
|
|
30
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
30
31
|
signIn: proxy(client.signIn.bind(client), false),
|
|
31
32
|
// We deliberately do NOT set isAuthenticated to false in the function below, because the app state
|
|
32
33
|
// 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/vue",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.15",
|
|
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.16"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@silverhand/eslint-config": "^6.0.1",
|