una-nuxt-module 2.0.2 → 2.1.1

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": "2.0.2",
3
+ "version": "2.1.1",
4
4
  "configKey": "unaNuxtModule",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { createResolver, defineNuxtModule, useLogger, extendPages, addLayout, ad
2
2
  import { defu } from 'defu';
3
3
 
4
4
  const name = "una-nuxt-module";
5
- const version = "2.0.2";
5
+ const version = "2.1.1";
6
6
 
7
7
  function resolve(path) {
8
8
  const resolver = createResolver(import.meta.url);
@@ -71,10 +71,12 @@ const module = defineNuxtModule({
71
71
  },
72
72
  async setup(_options, _nuxt) {
73
73
  const logger = useLogger(name);
74
+ const validateIDToken = import.meta.dev ? _nuxt.options.runtimeConfig.public.unaNuxtModule.sso.validateIDToken ?? false : true;
74
75
  const mergeRuntimeConfigWithDefaults = () => {
75
76
  _nuxt.options.runtimeConfig.public.unaNuxtModule = defu(
76
77
  _nuxt.options.runtimeConfig.public.unaNuxtModule,
77
78
  {
79
+ sso: { validateIDToken },
78
80
  use: {
79
81
  layout: {
80
82
  default: _options.use.layout.default,
@@ -11,6 +11,7 @@ export default defineNuxtPlugin((nuxtApp) => {
11
11
  auth?.initialize(config);
12
12
  auth?.signIn();
13
13
  auth?.on(Hooks.SignIn, async (response) => {
14
+ console.log("response SSO", response);
14
15
  const authorization = useAuthorization();
15
16
  const authStore = useAuthStore();
16
17
  const userInfo = {
@@ -40,6 +40,10 @@ export interface IUnaNuxtModuleOptions {
40
40
  * Lista de permisos o alcances solicitados.
41
41
  */
42
42
  scope: String[];
43
+ /**
44
+ * Indica si se debe validar el IDToken.
45
+ */
46
+ validateIDToken?: boolean;
43
47
  };
44
48
  /**
45
49
  * Configuración de las APIs utilizadas por el módulo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "2.0.2",
3
+ "version": "2.1.1",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,9 @@
25
25
  "dev": "nuxi dev playground",
26
26
  "dev:build": "nuxi build playground",
27
27
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
28
- "release": "npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
28
+ "releaseMajor": "npm run test && npm run prepack && changelogen --release --major && npm publish && git push --follow-tags",
29
+ "releaseMinor": "npm run test && npm run prepack && changelogen --release --minor && npm publish && git push --follow-tags",
30
+ "releasePatch": "npm run test && npm run prepack && changelogen --release --patch && npm publish && git push --follow-tags",
29
31
  "lint": "eslint .",
30
32
  "test": "vitest run",
31
33
  "test:watch": "vitest watch",