una-nuxt-module 3.0.15 → 3.0.16

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.15",
3
+ "version": "3.0.16",
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.15";
170
+ const version = "3.0.16";
171
171
 
172
172
  const module$1 = defineNuxtModule({
173
173
  meta: {
@@ -21,10 +21,11 @@ export default defineNuxtRouteMiddleware(async () => {
21
21
  const authResponse = await $authData();
22
22
  const token = await $accessToken();
23
23
  const resources = await authorization.getResources(token);
24
+ let email = "";
24
25
  const getUserInfo = () => {
25
26
  if (authResponse?.email) {
26
27
  const rawEmail = Array.isArray(authResponse?.email) ? authResponse?.email[0] : authResponse?.email;
27
- const email = rawEmail?.trim();
28
+ email = rawEmail?.trim();
28
29
  const [name, lastName] = email.toUpperCase().split(".");
29
30
  return {
30
31
  name,
@@ -34,8 +35,8 @@ export default defineNuxtRouteMiddleware(async () => {
34
35
  }
35
36
  };
36
37
  const userInfo = {
38
+ email,
37
39
  cedula: authResponse?.displayName,
38
- email: authResponse?.email,
39
40
  ...getUserInfo()
40
41
  };
41
42
  const authData = {
@@ -27,10 +27,11 @@ export default defineNuxtPlugin(() => {
27
27
  const { $pinia } = useNuxtApp();
28
28
  const authStore = useAuthStore($pinia);
29
29
  const authorization = useAuthorization();
30
+ let email = "";
30
31
  const getUserInfo = () => {
31
32
  if (response?.email) {
32
33
  const rawEmail = Array.isArray(response?.email) ? response?.email[0] : response?.email;
33
- const email = rawEmail?.trim();
34
+ email = rawEmail?.trim();
34
35
  const [name, lastName] = email.toUpperCase().split(".");
35
36
  return {
36
37
  name,
@@ -40,8 +41,8 @@ export default defineNuxtPlugin(() => {
40
41
  }
41
42
  };
42
43
  const userInfo = {
44
+ email,
43
45
  cedula: response.displayName,
44
- email: response.email,
45
46
  ...getUserInfo()
46
47
  };
47
48
  const token = await auth?.getAccessToken();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "3.0.15",
3
+ "version": "3.0.16",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",