ngx-sp-auth 4.20.8 → 4.20.10
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/fesm2022/ngx-sp-auth.mjs
CHANGED
|
@@ -1137,7 +1137,7 @@ class AuthService {
|
|
|
1137
1137
|
this._AUTH_BASE_URL = !this._customEnvironmentService.production ? this._AUTH_BASE_URL : `${this._customEnvironmentService.SpInfra2AuthWS}/Auth`;
|
|
1138
1138
|
this._BASE_URL = !this._customEnvironmentService.production ? this._BASE_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`;
|
|
1139
1139
|
this._BASE_OS_URL = !this._customEnvironmentService.production ? this._BASE_OS_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LoginIntegradoOS`;
|
|
1140
|
-
this._LOGOUT_BASE_URL = !this._customEnvironmentService.production ? this.
|
|
1140
|
+
this._LOGOUT_BASE_URL = !this._customEnvironmentService.production ? this._LOGOUT_BASE_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LogoutSisproErp`;
|
|
1141
1141
|
this.getParms();
|
|
1142
1142
|
}
|
|
1143
1143
|
// #region ==========> SERVICE METHODS <==========
|
|
@@ -1442,7 +1442,10 @@ class AuthService {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}));
|
|
1444
1444
|
}
|
|
1445
|
-
/**
|
|
1445
|
+
/**
|
|
1446
|
+
* Realiza o logout do sistema, consumindo o endpoint de logout para remover os cookies e limpando as informações de autenticação armazenadas no localStorage.
|
|
1447
|
+
* @returns Promise<boolean> indicando navegação para a tela de login após o logout.
|
|
1448
|
+
*/
|
|
1446
1449
|
logout() {
|
|
1447
1450
|
// Consumo de endpoint de logout
|
|
1448
1451
|
const url = `${this._LOGOUT_BASE_URL}`;
|
|
@@ -1453,8 +1456,8 @@ class AuthService {
|
|
|
1453
1456
|
localStorage.removeItem('configsServerPassword');
|
|
1454
1457
|
// Método com customizações para inicializações do Logout
|
|
1455
1458
|
this._customLoginService.authLogout();
|
|
1456
|
-
this._router.navigate(["/auth/login"]);
|
|
1457
1459
|
});
|
|
1460
|
+
return this._router.navigate(["/auth/login"]);
|
|
1458
1461
|
}
|
|
1459
1462
|
validateAuthentication2Fa(code) {
|
|
1460
1463
|
let Code2Fa = {
|