una-nuxt-module 3.0.21 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "3.0.21",
3
+ "version": "3.0.23",
4
4
  "configKey": "unaxt",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.0.0"
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.21";
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/ssoCallback.vue")
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,3 @@
1
+ <template>
2
+ <slot />
3
+ </template>
@@ -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 DEFAULT_SCOPES = ["openid", "profile", "email"];
13
- const scope = authConfig.sso?.scopes !== void 0 ? authConfig.sso?.scopes?.split("|") : DEFAULT_SCOPES;
12
+ const FALLBACK_SCOPES = ["openid", "profile", "email"];
13
+ const origin = window.location.origin;
14
14
  const config = {
15
- storage: "webWorker",
15
+ storage: "localStorage",
16
+ enablePKCE: true,
17
+ sendIdTokenInLogoutRequest: true,
16
18
  baseUrl: authConfig.sso?.baseUrl ?? "",
17
19
  clientID: authConfig.sso?.clientId ?? "",
18
- clientSecret: authConfig.sso?.clientSecret ?? "",
19
- scope,
20
- signInRedirectURL: "https://" + window.location.host + (authConfig.sso?.signInRedirectUrl ?? "/"),
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "3.0.21",
3
+ "version": "3.0.23",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",