ngx-sp-auth 4.17.8 → 4.17.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.
@@ -792,6 +792,10 @@ class AuthStorageService {
792
792
  /** Inicia a verificação do login. */
793
793
  startLoginCheck() {
794
794
  if (!this.__isCheckingAuth) {
795
+ // ERICK: Chamada do método custom movida para cá para chamar uma única vez ao invés de se repetir a cada validação do token no método reCheckLogin,
796
+ // visto que o método storageInitializeAutoStorage tem como objetivo realizar inicializações diversas quando o Login é executado via Pré Portal,
797
+ // e não há necessidade de repetir essas inicializações a cada verificação do token.
798
+ this._customStorageService.storageInitializeAutoStorage(); // Método com customizações para inicializações da AutoStorage
795
799
  this.reCheckLogin();
796
800
  }
797
801
  }
@@ -826,16 +830,11 @@ class AuthStorageService {
826
830
  return;
827
831
  }
828
832
  }
829
- if (this.ignoreCheckLogin) {
833
+ if (this.ignoreCheckLogin)
830
834
  this.ignoreCheckLogin = false;
831
- setTimeout(this.reCheckLogin.bind(this), leftTime * 1000);
832
- }
833
- else {
834
- this.isLoggedInSub.next(true);
835
- setTimeout(this.reCheckLogin.bind(this), leftTime * 1000);
836
- // Método com customizações para inicializações da AutoStorage
837
- this._customStorageService.storageInitializeAutoStorage();
838
- }
835
+ this.isLoggedInSub.next(true);
836
+ // A cada 30 segundos, o método reCheckLogin é chamado para verificar se o token ainda é válido ou se precisa ser renovado.
837
+ setTimeout(this.reCheckLogin.bind(this), 30000);
839
838
  }
840
839
  logout() {
841
840
  this.__isCheckingAuth = false;