public virtual async Task OnSsoLoginLogoutRedirectCompleted(Uri url) { Dictionary <string, string> query = (Dictionary <string, string>)FormDecode(url.Fragment); if (CurrentAction == "Logout") { CurrentLogoutTaskCompletionSource.SetResult(null); } else { Token token = query; string jsonToken = JsonConvert.SerializeObject(token); if (UseSecureStorage()) { await SecureStorage.SetAsync("Token", jsonToken).ConfigureAwait(false); } else { Preferences.Set("Token", jsonToken); } CurrentLoginTaskCompletionSource.SetResult(query); } }
public virtual async void OnSsoLoginLogoutRedirectCompleted(Uri url) { Dictionary <string, string> query = (Dictionary <string, string>)WebEx.FormDecode(url.Fragment); if (CurrentAction == "Logout") { CurrentLogoutTaskCompletionSource.SetResult(null); } else { Token token = query; Account account = Token.FromTokenToAccount(token); await _accountStore.SaveAsync(account, _clientAppProfile.AppName).ConfigureAwait(false); CurrentLoginTaskCompletionSource.SetResult(query); } }