ngx-dsxlibrary 2.21.19 → 2.21.20
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.
|
@@ -2179,11 +2179,15 @@ class AuthorizeService {
|
|
|
2179
2179
|
// La revocación en el servidor se hace en segundo plano para no bloquear la navegación.
|
|
2180
2180
|
this.clearSessionData();
|
|
2181
2181
|
// 5️⃣ Intentar revocar el token en el servidor (fire-and-forget)
|
|
2182
|
-
console.info(
|
|
2182
|
+
// console.info(
|
|
2183
|
+
// '[AuthorizeService] Revocando refresh token en el servidor (en segundo plano)...',
|
|
2184
|
+
// );
|
|
2183
2185
|
this._securityService.tokenRevok(refreshToken).subscribe({
|
|
2184
2186
|
next: (success) => {
|
|
2185
2187
|
if (success) {
|
|
2186
|
-
console.info(
|
|
2188
|
+
// console.info(
|
|
2189
|
+
// '[AuthorizeService] Refresh token revocado exitosamente en el servidor',
|
|
2190
|
+
// );
|
|
2187
2191
|
}
|
|
2188
2192
|
else {
|
|
2189
2193
|
console.warn('[AuthorizeService] El servidor no pudo revocar el token.');
|
|
@@ -2198,7 +2202,7 @@ class AuthorizeService {
|
|
|
2198
2202
|
});
|
|
2199
2203
|
},
|
|
2200
2204
|
complete: () => {
|
|
2201
|
-
console.info('[AuthorizeService] Proceso de logout completado');
|
|
2205
|
+
//console.info('[AuthorizeService] Proceso de logout completado');
|
|
2202
2206
|
},
|
|
2203
2207
|
});
|
|
2204
2208
|
}
|
|
@@ -2241,7 +2245,9 @@ class AuthorizeService {
|
|
|
2241
2245
|
*/
|
|
2242
2246
|
clearSessionData() {
|
|
2243
2247
|
try {
|
|
2244
|
-
console.info(
|
|
2248
|
+
// console.info(
|
|
2249
|
+
// '[AuthorizeService] Iniciando limpieza de datos de sesión...',
|
|
2250
|
+
// );
|
|
2245
2251
|
// 1️⃣ Eliminar cookies con path explícito
|
|
2246
2252
|
const cookiesToDelete = [
|
|
2247
2253
|
this.environment.tokenName,
|
|
@@ -2262,7 +2268,7 @@ class AuthorizeService {
|
|
|
2262
2268
|
this._cookieService.delete(cookieName, '/', domain);
|
|
2263
2269
|
});
|
|
2264
2270
|
}
|
|
2265
|
-
console.debug(`[AuthorizeService] Cookie eliminada: ${cookieName}`);
|
|
2271
|
+
//console.debug(`[AuthorizeService] Cookie eliminada: ${cookieName}`);
|
|
2266
2272
|
}
|
|
2267
2273
|
catch (error) {
|
|
2268
2274
|
console.error(`[AuthorizeService] Error al eliminar cookie ${cookieName}:`, error);
|
|
@@ -2271,13 +2277,13 @@ class AuthorizeService {
|
|
|
2271
2277
|
// 2️⃣ Limpiar localStorage
|
|
2272
2278
|
try {
|
|
2273
2279
|
localStorage.clear();
|
|
2274
|
-
console.debug('[AuthorizeService] localStorage limpiado');
|
|
2280
|
+
//console.debug('[AuthorizeService] localStorage limpiado');
|
|
2275
2281
|
}
|
|
2276
2282
|
catch (error) {
|
|
2277
2283
|
console.error('[AuthorizeService] Error al limpiar localStorage:', error);
|
|
2278
2284
|
}
|
|
2279
2285
|
// 3️⃣ Redirigir al login
|
|
2280
|
-
console.info('[AuthorizeService] Redirigiendo a página de login...');
|
|
2286
|
+
//console.info('[AuthorizeService] Redirigiendo a página de login...');
|
|
2281
2287
|
this._router.navigate(['/login']).then(() => console.info('[AuthorizeService] Redirección exitosa a /login'), (error) => console.error('[AuthorizeService] Error en la redirección:', error));
|
|
2282
2288
|
}
|
|
2283
2289
|
catch (error) {
|