ngx-sp-auth 4.18.1 → 4.18.2
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
|
@@ -2837,10 +2837,14 @@ class LoginComponent {
|
|
|
2837
2837
|
this._authService.forgottenPassword(this.formFgtPsw.value).subscribe({
|
|
2838
2838
|
next: () => {
|
|
2839
2839
|
this.isLoadingForgottenPassword = false;
|
|
2840
|
-
let
|
|
2841
|
-
this.
|
|
2842
|
-
|
|
2843
|
-
|
|
2840
|
+
let origin = window.location.origin; // Ajuste para funcionar tanto em ambiente de desenvolvimento (localhost) quanto em ambiente de produção (com domínio)
|
|
2841
|
+
let param = btoa(`false$${this.dominioFgtPsw}$${this.usuarioFgtPsw}$${3}`); // Cria os parâmetros necessário para a tela de criação de senha.
|
|
2842
|
+
window.location.href = `${origin}/SisproErpCloud/PrePortal/auth/login/novaSenha/${param}`; // Faz o redirecionamento
|
|
2843
|
+
// Abaixo foi comentado até pensar em uma estratégia melhor para o redirecionamento com mensagem prévia
|
|
2844
|
+
// Possivelmente utilizar um timedRedirect de ~3s e nesse tempo exibir a mensagem
|
|
2845
|
+
// this._router.navigate([`auth/login/novaSenha/${ param }`]).then(() => {
|
|
2846
|
+
// this._toastrService.success("Verifique no seu e-mail o código de validação.");
|
|
2847
|
+
// });
|
|
2844
2848
|
},
|
|
2845
2849
|
error: (error) => {
|
|
2846
2850
|
this.isLoadingForgottenPassword = false;
|