@devmob-firb wrote:
Hi, when I logout with a user-A and then login with another user (user-B) I still see this user-B data/views. How can I properly clear the cache when the user logout? This is my logout() method written in a service:
logout(): { this.token$ = null; this.user$ = null; this.storage.removeLocalItem('currentUser'); this.storage.removeLocalItem('currentUserHealthProfessionals'); this.storage.removeLocalItem('token'); this.storage.removeLocalItem('mfa_token'); this._router.navigate(['/login'], { clearHistory: true } as NavigationExtras); }
Posts: 1
Participants: 1