una-nuxt-module 3.0.23 → 3.0.25

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.23",
3
+ "version": "3.0.25",
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.23";
170
+ const version = "3.0.25";
171
171
 
172
172
  const module$1 = defineNuxtModule({
173
173
  meta: {
@@ -186,7 +186,7 @@ const module$1 = defineNuxtModule({
186
186
  automaticSignIn: true,
187
187
  postLoginRedirectUrl: "/",
188
188
  signInRedirectUrl: "/auth/sso/login",
189
- signOutRedirectUrl: "/auth/sso/login"
189
+ signOutRedirectUrl: "/auth/sso/logout"
190
190
  },
191
191
  middleware: {
192
192
  authentication: {
@@ -323,7 +323,12 @@ const module$1 = defineNuxtModule({
323
323
  nuxt.options.runtimeConfig.public.unaxt,
324
324
  {
325
325
  auth: {
326
- unprotectedPages: ["/401", "/403", "/auth/sso/login"]
326
+ unprotectedPages: [
327
+ "/401",
328
+ "/403",
329
+ "/auth/sso/login",
330
+ "/auth/sso/logout"
331
+ ]
327
332
  }
328
333
  }
329
334
  );
@@ -340,17 +345,21 @@ const module$1 = defineNuxtModule({
340
345
  file: resolve("./runtime/auth/pages/403.vue")
341
346
  },
342
347
  {
348
+ name: "auth-sso-login",
343
349
  path: "/auth/sso/login",
344
350
  file: resolve("./runtime/auth/pages/login.vue")
345
351
  },
346
352
  {
353
+ name: "auth-sso-logout",
347
354
  path: "/auth/sso/logout",
348
355
  file: resolve("./runtime/auth/pages/logout.vue")
349
356
  }
350
357
  );
351
358
  });
352
359
  logger.ready(
353
- "\u2514\u2500\u2500 " + gray("Rutas registradas: ['/401', '/403', '/auth/sso/login']")
360
+ "\u2514\u2500\u2500 " + gray(
361
+ "Rutas registradas: ['/401', '/403', '/auth/sso/login', '/auth/sso/logout']"
362
+ )
354
363
  );
355
364
  logger.ready(
356
365
  green("M\xF3dulo de autenticaci\xF3n inicializado correctamente")
@@ -3,17 +3,13 @@
3
3
  </template>
4
4
 
5
5
  <script setup>
6
- import { useRuntimeConfig, useNuxtApp } from "#app";
6
+ import { useRuntimeConfig } from "#app";
7
7
  import { navigateTo } from "#imports";
8
8
  import { onMounted } from "vue";
9
9
  onMounted(async () => {
10
- const { $isAuthenticated } = useNuxtApp();
11
- const isAuthenticated = await $isAuthenticated();
12
- if (isAuthenticated) {
13
- const runtimeConfig = useRuntimeConfig();
14
- await navigateTo(
15
- runtimeConfig.public.unaxt.auth.sso?.postLoginRedirectUrl ?? "/"
16
- );
17
- }
10
+ const runtimeConfig = useRuntimeConfig();
11
+ await navigateTo(
12
+ runtimeConfig.public.unaxt.auth.sso?.postLoginRedirectUrl ?? "/"
13
+ );
18
14
  });
19
15
  </script>
@@ -1,3 +1,15 @@
1
1
  <template>
2
2
  <slot />
3
3
  </template>
4
+
5
+ <script setup>
6
+ import { useRuntimeConfig } from "#app";
7
+ import { navigateTo } from "#imports";
8
+ import { onMounted } from "vue";
9
+ onMounted(async () => {
10
+ const runtimeConfig = useRuntimeConfig();
11
+ await navigateTo(
12
+ runtimeConfig.public.unaxt.auth.sso?.signInRedirectUrl ?? "/"
13
+ );
14
+ });
15
+ </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "3.0.23",
3
+ "version": "3.0.25",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",