feat(saas): PWA instalable y pantallas de recuperación y privacidad
Bloque B de la fase SaaS: - @angular/pwa: service worker (solo assets; /api siempre fresco), manifest con identidad recordaLexia (standalone, tema de la paleta) e iconos propios 72-512px (mascota sobre azul de marca). - Pantallas /forgot y /reset (?code=... del email): mensajes neutros que no revelan si una cuenta existe; validación de contraseña repetida. - Política de privacidad ES/CA en /privacidad (pública) y casilla de consentimiento obligatoria en el registro (no premarcada). - AuthService: forgotPassword/resetPassword y registro con privacyAccepted. Verificado E2E en navegador: registro con gating del checkbox, enlace del log, reset, login con la nueva contraseña (la vieja 401), SW 'activated', y familia de prueba borrada con el endpoint RGPD (dogfooding).
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
|
||||
import { ApplicationConfig, provideZoneChangeDetection, isDevMode } from '@angular/core';
|
||||
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
|
||||
import { provideRouter } from '@angular/router';
|
||||
|
||||
import { routes } from './app.routes';
|
||||
import { authInterceptor } from './core/auth.interceptor';
|
||||
import { provideServiceWorker } from '@angular/service-worker';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||
provideRouter(routes),
|
||||
// Cliente HTTP (fetch) con el interceptor de sesión de familia.
|
||||
provideHttpClient(withFetch(), withInterceptors([authInterceptor])),
|
||||
provideHttpClient(withFetch(), withInterceptors([authInterceptor])), provideServiceWorker('ngsw-worker.js', {
|
||||
enabled: !isDevMode(),
|
||||
registrationStrategy: 'registerWhenStable:30000'
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user