una-nuxt-module 3.0.22 → 3.0.23
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/dist/module.json +1 -1
- package/dist/module.mjs +6 -3
- package/dist/runtime/auth/pages/{ssoCallback.vue → login.vue} +0 -1
- package/dist/runtime/auth/pages/logout.d.vue.ts +13 -0
- package/dist/runtime/auth/pages/logout.vue +3 -0
- package/dist/runtime/auth/pages/logout.vue.d.ts +13 -0
- package/dist/runtime/auth/plugins/auth.js +7 -6
- package/dist/runtime/types/index.d.ts +0 -4
- package/package.json +1 -1
- /package/dist/runtime/auth/pages/{ssoCallback.d.vue.ts → login.d.vue.ts} +0 -0
- /package/dist/runtime/auth/pages/{ssoCallback.vue.d.ts → login.vue.d.ts} +0 -0
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -167,7 +167,7 @@ function addTemplates() {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
const name = "una-nuxt-module";
|
|
170
|
-
const version = "3.0.
|
|
170
|
+
const version = "3.0.23";
|
|
171
171
|
|
|
172
172
|
const module$1 = defineNuxtModule({
|
|
173
173
|
meta: {
|
|
@@ -340,9 +340,12 @@ const module$1 = defineNuxtModule({
|
|
|
340
340
|
file: resolve("./runtime/auth/pages/403.vue")
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
|
-
name: "ssoCallback",
|
|
344
343
|
path: "/auth/sso/login",
|
|
345
|
-
file: resolve("./runtime/auth/pages/
|
|
344
|
+
file: resolve("./runtime/auth/pages/login.vue")
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
path: "/auth/sso/logout",
|
|
348
|
+
file: resolve("./runtime/auth/pages/logout.vue")
|
|
346
349
|
}
|
|
347
350
|
);
|
|
348
351
|
});
|
|
@@ -7,7 +7,6 @@ import { useRuntimeConfig, useNuxtApp } from "#app";
|
|
|
7
7
|
import { navigateTo } from "#imports";
|
|
8
8
|
import { onMounted } from "vue";
|
|
9
9
|
onMounted(async () => {
|
|
10
|
-
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
11
10
|
const { $isAuthenticated } = useNuxtApp();
|
|
12
11
|
const isAuthenticated = await $isAuthenticated();
|
|
13
12
|
if (isAuthenticated) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -9,16 +9,17 @@ export default defineNuxtPlugin(() => {
|
|
|
9
9
|
const auth = AsgardeoSPAClient.getInstance();
|
|
10
10
|
const runtimeConfig = useRuntimeConfig();
|
|
11
11
|
const authConfig = runtimeConfig.public.unaxt.auth;
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const FALLBACK_SCOPES = ["openid", "profile", "email"];
|
|
13
|
+
const origin = window.location.origin;
|
|
14
14
|
const config = {
|
|
15
15
|
storage: "localStorage",
|
|
16
|
+
enablePKCE: true,
|
|
17
|
+
sendIdTokenInLogoutRequest: true,
|
|
16
18
|
baseUrl: authConfig.sso?.baseUrl ?? "",
|
|
17
19
|
clientID: authConfig.sso?.clientId ?? "",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
signOutRedirectURL: "https://" + window.location.host + (authConfig.sso?.signOutRedirectUrl ?? "/")
|
|
20
|
+
signInRedirectURL: origin + (authConfig.sso?.signInRedirectUrl ?? "/"),
|
|
21
|
+
signOutRedirectURL: origin + (authConfig.sso?.signOutRedirectUrl ?? "/"),
|
|
22
|
+
scope: authConfig.sso?.scopes !== void 0 ? authConfig.sso?.scopes?.split("|") : FALLBACK_SCOPES
|
|
22
23
|
};
|
|
23
24
|
auth?.initialize(config);
|
|
24
25
|
if (authConfig.sso?.automaticSignIn) {
|
|
@@ -26,10 +26,6 @@ interface ISSOConfig {
|
|
|
26
26
|
* ID del cliente para la autenticación (OAuth Client Key del Service Provider).
|
|
27
27
|
*/
|
|
28
28
|
clientId: string;
|
|
29
|
-
/**
|
|
30
|
-
* OAuth Client Secret del Service Provider)
|
|
31
|
-
*/
|
|
32
|
-
clientSecret: string;
|
|
33
29
|
/**
|
|
34
30
|
* URL base del servicio SSO (servidor WSO2).
|
|
35
31
|
*/
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|