async Task Logout() { Logger.Track(EvolveLoggerKeys.Logout); try { ISSOClient ssoClient = DependencyService.Get <ISSOClient>(); if (ssoClient != null) { await ssoClient.LogoutAsync(); } // clear sign in data first! Settings.FirstName = string.Empty; Settings.LastName = string.Empty; Settings.Email = string.Empty; //this triggers login text changed! // then log back in as an anonymous user. await DoAnonymousLogin(); await ExecuteSyncCommandAsync(); } catch (Exception ex) { ex.Data["method"] = "ExecuteLoginCommandAsync"; //TODO validate here. Logger.Report(ex); } }
async Task Logout() { Logger.Track(ConferenceLoggerKeys.Logout); try { ISSOClient ssoClient = DependencyService.Get <ISSOClient>(); if (ssoClient != null) { await ssoClient.LogoutAsync(); } Settings.FirstName = string.Empty; Settings.LastName = string.Empty; Settings.Email = string.Empty; //this triggers login text changed! //drop favorites and feedback because we logged out. await StoreManager.FavoriteStore.DropFavorites(); await StoreManager.FeedbackStore.DropFeedback(); await StoreManager.DropEverythingAsync(); await ExecuteSyncCommandAsync(); } catch (Exception ex) { ex.Data["method"] = "ExecuteLoginCommandAsync"; //TODO validate here. Logger.Report(ex); } }