valtech-components 2.0.851 → 2.0.853
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/esm2022/lib/components/organisms/mfa-modal/mfa-modal.component.mjs +21 -5
- package/esm2022/lib/services/auth/auth.service.mjs +5 -4
- package/esm2022/lib/services/auth/types.mjs +1 -1
- package/esm2022/lib/services/i18n/default-content.mjs +5 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +29 -8
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mfa-modal/mfa-modal.component.d.ts +6 -1
- package/lib/services/auth/auth.service.d.ts +4 -3
- package/lib/services/auth/types.d.ts +8 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -64,6 +64,8 @@ export declare class MfaModalComponent implements OnDestroy {
|
|
|
64
64
|
readonly mfaMethod: import("@angular/core").WritableSignal<MFAMethod>;
|
|
65
65
|
readonly userPhone: import("@angular/core").WritableSignal<string>;
|
|
66
66
|
readonly backupCodesCount: import("@angular/core").WritableSignal<number>;
|
|
67
|
+
/** Default true para no romper el flow viejo si el backend no devuelve el campo. */
|
|
68
|
+
readonly hasPassword: import("@angular/core").WritableSignal<boolean>;
|
|
67
69
|
readonly selectedMethod: import("@angular/core").WritableSignal<MFAMethod>;
|
|
68
70
|
readonly totpSetup: import("@angular/core").WritableSignal<TOTPSetupResponse>;
|
|
69
71
|
readonly totpQr: import("@angular/core").WritableSignal<QrResult>;
|
|
@@ -113,8 +115,11 @@ export declare class MfaModalComponent implements OnDestroy {
|
|
|
113
115
|
resendCode(): void;
|
|
114
116
|
/** Regenera los códigos de respaldo TOTP y los muestra una vez. */
|
|
115
117
|
regenerateBackupCodes(): void;
|
|
116
|
-
/** Deshabilita MFA
|
|
118
|
+
/** Deshabilita MFA usando la contraseña de la cuenta. */
|
|
117
119
|
onDisableSubmit(event: FormSubmit): void;
|
|
120
|
+
/** Deshabilita MFA usando un código TOTP — para cuentas OAuth-only sin contraseña. */
|
|
121
|
+
disableWithMfaCode(): void;
|
|
122
|
+
private disable;
|
|
118
123
|
/** Copia una lista de códigos de respaldo al portapapeles. */
|
|
119
124
|
copyCodes(codes: string[]): Promise<void>;
|
|
120
125
|
/** Copia el secreto TOTP al portapapeles + feedback visual (check) durante 2s. */
|
|
@@ -6,7 +6,7 @@ import { AuthStateService } from './auth-state.service';
|
|
|
6
6
|
import { TokenService } from './token.service';
|
|
7
7
|
import { AuthStorageService } from './storage.service';
|
|
8
8
|
import { AuthSyncService } from './sync.service';
|
|
9
|
-
import { SigninRequest, SigninResponse, SignupRequest, SignupResponse, VerifyEmailRequest, VerifyEmailResponse, ResendCodeRequest, ResendCodeResponse, MFAVerifyResponse, RefreshResponse, GetPermissionsResponse, GetProfileResponse, UpdateProfileRequest, UpdateProfileResponse, MFASetupResponse, MFAConfirmResponse, MFADisableResponse, ForgotPasswordRequest, ForgotPasswordResponse, ResetPasswordRequest, ResetPasswordResponse, ChangePasswordResponse, DeleteAccountResponse, SwitchOrgResponse, MFAMethod, AuthError, ValtechAuthConfig, EnableNotificationsResult, NotificationPermissionState, RegisterDeviceResult, TOTPSetupResponse, TOTPVerifySetupResponse, TOTPDisableResponse, RegenerateBackupCodesResponse, BackupCodesCountResponse, OAuthProvider, LinkedProvider, HasPasswordResponse, UpdateHandleResponse, CheckHandleResponse, UpdateAvatarRequest, UpdateAvatarResponse } from './types';
|
|
9
|
+
import { SigninRequest, SigninResponse, SignupRequest, SignupResponse, VerifyEmailRequest, VerifyEmailResponse, ResendCodeRequest, ResendCodeResponse, MFAVerifyResponse, RefreshResponse, GetPermissionsResponse, GetProfileResponse, UpdateProfileRequest, UpdateProfileResponse, MFASetupResponse, MFAConfirmResponse, MFADisableRequest, MFADisableResponse, ForgotPasswordRequest, ForgotPasswordResponse, ResetPasswordRequest, ResetPasswordResponse, ChangePasswordResponse, DeleteAccountResponse, SwitchOrgResponse, MFAMethod, AuthError, ValtechAuthConfig, EnableNotificationsResult, NotificationPermissionState, RegisterDeviceResult, TOTPSetupResponse, TOTPVerifySetupResponse, TOTPDisableResponse, RegenerateBackupCodesResponse, BackupCodesCountResponse, OAuthProvider, LinkedProvider, HasPasswordResponse, UpdateHandleResponse, CheckHandleResponse, UpdateAvatarRequest, UpdateAvatarResponse } from './types';
|
|
10
10
|
import { OAuthService } from './oauth.service';
|
|
11
11
|
import { FirebaseService, MessagingService } from '../firebase';
|
|
12
12
|
import { I18nService } from '../i18n';
|
|
@@ -213,9 +213,10 @@ export declare class AuthService implements OnDestroy {
|
|
|
213
213
|
*/
|
|
214
214
|
confirmMFA(code: string): Observable<MFAConfirmResponse>;
|
|
215
215
|
/**
|
|
216
|
-
* Deshabilita MFA.
|
|
216
|
+
* Deshabilita MFA. Acepta `password` o `mfaCode` (uno requerido).
|
|
217
|
+
* `mfaCode` es para usuarios OAuth-only con TOTP que no tienen contraseña.
|
|
217
218
|
*/
|
|
218
|
-
disableMFA(
|
|
219
|
+
disableMFA(input: MFADisableRequest): Observable<MFADisableResponse>;
|
|
219
220
|
/**
|
|
220
221
|
* Inicia configuración de TOTP MFA.
|
|
221
222
|
* Retorna el secreto, URL para QR code y códigos de respaldo.
|
|
@@ -373,8 +373,13 @@ export interface MFAConfirmResponse {
|
|
|
373
373
|
/**
|
|
374
374
|
* Request para deshabilitar MFA.
|
|
375
375
|
*/
|
|
376
|
+
/**
|
|
377
|
+
* Acepta `password` (cuenta con contraseña) o `mfaCode` (cuenta OAuth-only
|
|
378
|
+
* con TOTP que prueba posesión del segundo factor). Uno requerido.
|
|
379
|
+
*/
|
|
376
380
|
export interface MFADisableRequest {
|
|
377
|
-
password
|
|
381
|
+
password?: string;
|
|
382
|
+
mfaCode?: string;
|
|
378
383
|
}
|
|
379
384
|
/**
|
|
380
385
|
* Response de deshabilitar MFA.
|
|
@@ -456,6 +461,8 @@ export interface GetProfileResponse {
|
|
|
456
461
|
phoneVerified: boolean;
|
|
457
462
|
mfaEnabled: boolean;
|
|
458
463
|
mfaMethod?: MFAMethod;
|
|
464
|
+
/** True si la cuenta tiene contraseña seteada (false para OAuth-only sin password). */
|
|
465
|
+
hasPassword?: boolean;
|
|
459
466
|
createdAt: string;
|
|
460
467
|
updatedAt: string;
|
|
461
468
|
}
|
package/lib/version.d.ts
CHANGED