una-nuxt-module 3.0.7 → 3.0.8

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.7",
3
+ "version": "3.0.8",
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.7";
170
+ const version = "3.0.8";
171
171
 
172
172
  const module$1 = defineNuxtModule({
173
173
  meta: {
@@ -7,17 +7,17 @@ export default defineNuxtRouteMiddleware(async () => {
7
7
  }
8
8
  const authorization = useAuthorization();
9
9
  const authStore = useAuthStore();
10
- if (!authStore.isAuthenticated) {
11
- const { $signIn, $authData, $isAuthenticated, $accessToken } = useNuxtApp();
12
- const isAuthenticated = await $isAuthenticated();
13
- if (!isAuthenticated) {
14
- const runtimeConfig = useRuntimeConfig();
15
- const authConfig = runtimeConfig.public.unaxt.auth;
16
- if (!authConfig.sso?.automaticSignIn) {
17
- await $signIn();
18
- }
19
- return;
10
+ const { $signIn, $authData, $isAuthenticated, $accessToken } = useNuxtApp();
11
+ const isAuthenticated = await $isAuthenticated();
12
+ if (!isAuthenticated) {
13
+ const runtimeConfig = useRuntimeConfig();
14
+ const authConfig = runtimeConfig.public.unaxt.auth;
15
+ if (!authConfig.sso?.automaticSignIn) {
16
+ await $signIn();
20
17
  }
18
+ return;
19
+ }
20
+ if (!authStore.isAuthenticated) {
21
21
  const authResponse = await $authData();
22
22
  const token = await $accessToken();
23
23
  const resources = await authorization.getResources(token);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",