@logto/vue 0.1.9 → 0.1.12
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/context.js +1 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -1
- package/lib/plugin.js +3 -1
- package/package.json +3 -3
package/lib/context.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IdTokenClaims, LogtoConfig, UserInfoResponse } from '@logto/browser';
|
|
2
2
|
import { App, Ref } from 'vue';
|
|
3
|
-
export type { LogtoConfig, IdTokenClaims, UserInfoResponse, LogtoClientErrorCode, } from '@logto/browser';
|
|
4
|
-
export { LogtoClientError } from '@logto/browser';
|
|
3
|
+
export type { LogtoConfig, IdTokenClaims, UserInfoResponse, LogtoErrorCode, LogtoClientErrorCode, } from '@logto/browser';
|
|
4
|
+
export { LogtoError, LogtoClientError, OidcError } from '@logto/browser';
|
|
5
5
|
declare type LogtoVuePlugin = {
|
|
6
6
|
install: (app: App, config: LogtoConfig) => void;
|
|
7
7
|
};
|
package/lib/index.js
CHANGED
|
@@ -3,14 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useHandleSignInCallback = exports.useLogto = exports.createLogto = exports.LogtoClientError = void 0;
|
|
6
|
+
exports.useHandleSignInCallback = exports.useLogto = exports.createLogto = exports.OidcError = exports.LogtoClientError = exports.LogtoError = void 0;
|
|
7
7
|
const browser_1 = __importDefault(require("@logto/browser"));
|
|
8
8
|
const vue_1 = require("vue");
|
|
9
9
|
const consts_1 = require("./consts");
|
|
10
10
|
const context_1 = require("./context");
|
|
11
11
|
const plugin_1 = require("./plugin");
|
|
12
12
|
var browser_2 = require("@logto/browser");
|
|
13
|
+
Object.defineProperty(exports, "LogtoError", { enumerable: true, get: function () { return browser_2.LogtoError; } });
|
|
13
14
|
Object.defineProperty(exports, "LogtoClientError", { enumerable: true, get: function () { return browser_2.LogtoClientError; } });
|
|
15
|
+
Object.defineProperty(exports, "OidcError", { enumerable: true, get: function () { return browser_2.OidcError; } });
|
|
14
16
|
/**
|
|
15
17
|
* Creates the Logto Vue plugin
|
|
16
18
|
*
|
package/lib/plugin.js
CHANGED
|
@@ -26,7 +26,9 @@ const createPluginMethods = (context) => {
|
|
|
26
26
|
try {
|
|
27
27
|
setLoading(true);
|
|
28
28
|
await logtoClient.value.signOut(postLogoutRedirectUri);
|
|
29
|
-
|
|
29
|
+
// We deliberately do NOT set isAuthenticated to false here, because the app state may change immediately
|
|
30
|
+
// even before navigating to the oidc end session endpoint, which might cause rendering problems.
|
|
31
|
+
// Instead, we will reload isAuthenticated state when the user is redirected back to the app.
|
|
30
32
|
}
|
|
31
33
|
catch (error) {
|
|
32
34
|
setError(error, 'Unexpected error occurred while signing out.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"exports": "./lib/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepack": "pnpm test"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@logto/browser": "^0.1.
|
|
27
|
+
"@logto/browser": "^0.1.11"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@jest/types": "^27.5.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "1e7449daf62edac7f7dd2eb37f3e5b83e6bf3c56"
|
|
65
65
|
}
|