una-nuxt-module 3.0.23 → 3.0.24

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.24",
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.24";
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
  );
@@ -350,7 +355,9 @@ const module$1 = defineNuxtModule({
350
355
  );
351
356
  });
352
357
  logger.ready(
353
- "\u2514\u2500\u2500 " + gray("Rutas registradas: ['/401', '/403', '/auth/sso/login']")
358
+ "\u2514\u2500\u2500 " + gray(
359
+ "Rutas registradas: ['/401', '/403', '/auth/sso/login', '/auth/sso/logout']"
360
+ )
354
361
  );
355
362
  logger.ready(
356
363
  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.24",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",