@trudb/tru-common-lib 0.0.720 → 0.0.723

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.
@@ -3729,11 +3729,10 @@ class TruAuth {
3729
3729
  this.auth.setUser(this.user);
3730
3730
  }
3731
3731
  logout() {
3732
- return this.http
3733
- .post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/logout`, null)
3734
- .pipe(tap(() => {
3732
+ this.http
3733
+ .post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/logout`, null).subscribe(() => {
3735
3734
  this.doLogoutAndRedirectToLogin();
3736
- }));
3735
+ });
3737
3736
  }
3738
3737
  userClaims() {
3739
3738
  return this.http
@@ -6011,7 +6010,12 @@ class TruAuthJwtStrategy {
6011
6010
  user.create(userData);
6012
6011
  }
6013
6012
  getJwtToken() {
6014
- return JSON.parse(localStorage.getItem(this.JWT_ACCESS_TOKEN));
6013
+ try {
6014
+ return JSON.parse(localStorage.getItem(this.JWT_ACCESS_TOKEN));
6015
+ }
6016
+ catch (e) {
6017
+ return null;
6018
+ }
6015
6019
  }
6016
6020
  getDecodedJwtJsonData() {
6017
6021
  let token = JSON.parse(localStorage.getItem(this.JWT_ACCESS_TOKEN));