valtech-components 4.0.42 → 4.0.43

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.
@@ -1,4 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { ValtechAuthConfig } from './types';
4
+ import { AuthService } from './auth.service';
2
5
  import * as i0 from "@angular/core";
3
6
  /**
4
7
  * Componente de callback para OAuth.
@@ -24,6 +27,9 @@ import * as i0 from "@angular/core";
24
27
  * `/auth/oauth/callback?error=INVALID_CODE&error_description=...`
25
28
  */
26
29
  export declare class OAuthCallbackComponent implements OnInit {
30
+ private router;
31
+ private authService;
32
+ private config;
27
33
  message: string;
28
34
  /**
29
35
  * Nonce que el opener generó y pasó por el flujo (round-trip backend). Se
@@ -31,10 +37,24 @@ export declare class OAuthCallbackComponent implements OnInit {
31
37
  * y rechace un oauth_callback_data forjado en localStorage por XSS (M-07).
32
38
  */
33
39
  private clientNonce;
40
+ constructor(router: Router, authService: AuthService | null, config: ValtechAuthConfig | null);
34
41
  ngOnInit(): void;
42
+ /**
43
+ * Indica si este callback corre como la VENTANA PRINCIPAL (flujo redirect),
44
+ * no como popup. El popup se abre con window.name 'oauth'/'oauth-link'
45
+ * (OAuthService), nombre que persiste aunque COOP anule window.opener tras el
46
+ * bounce cross-origin. En la ventana principal nadie consume el localStorage,
47
+ * así que el callback debe instalar la sesión y navegar él mismo.
48
+ */
49
+ private isMainWindow;
50
+ /**
51
+ * Completa el login en la ventana principal: instala la sesión desde los
52
+ * tokens del callback y navega al home.
53
+ */
54
+ private completeInMainWindow;
35
55
  private processCallback;
36
56
  private sendToParent;
37
57
  private closeAfterDelay;
38
- static ɵfac: i0.ɵɵFactoryDeclaration<OAuthCallbackComponent, never>;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<OAuthCallbackComponent, [null, { optional: true; }, { optional: true; }]>;
39
59
  static ɵcmp: i0.ɵɵComponentDeclaration<OAuthCallbackComponent, "val-oauth-callback", never, {}, {}, never, never, true, never>;
40
60
  }
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.42";
5
+ export declare const VERSION = "4.0.43";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.42",
3
+ "version": "4.0.43",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"