public void LogOut() { _tokenService.Token = null; _tokenService.RefreshToken = null; UserId = null; Email = null; _cryptoService.ClearKeys(); _settings.Remove(Constants.SecurityStamp); _settings.Remove(Constants.PushLastRegistrationDate); _settings.Remove(Constants.Locked); }
public void LogOut() { _tokenService.Token = null; _tokenService.RefreshToken = null; _tokenService.AuthBearer = null; UserId = null; Email = null; _cryptoService.ClearKeys(); _settings.Remove(Constants.FirstVaultLoad); _settings.Remove(Constants.PushLastRegistrationDate); _settings.Remove(Constants.Locked); }
public void LogOut(string logoutMessage = null) { CipherService.CachedCiphers = null; _tokenService.Token = null; UserId = null; Email = null; _cryptoService.ClearKeys(); _settings.Remove(Constants.SecurityStamp); _settings.Remove(Constants.PushLastRegistrationDate); _settings.Remove(Constants.Locked); Task.Run(async() => await _deviceApiRepository.PutClearTokenAsync(_appIdService.AppId)); _googleAnalyticsService.TrackAppEvent("LoggedOut"); Device.BeginInvokeOnMainThread(() => Application.Current.MainPage = new ExtendedNavigationPage(new HomePage())); if (!string.IsNullOrWhiteSpace(logoutMessage)) { Resolver.Resolve <IUserDialogs>()?.Toast(logoutMessage); } }