Last active
August 29, 2015 14:09
-
-
Save peleyal/ab011e474008203cc037 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Continues the app after retrieving the authorization code. | |
/// | |
/// First it stores the authorization code result in the data store. | |
/// Then it calls the view model get blogs method, in order to retrieve all blogs. | |
/// The view model is responsible to check for if the authorization code exists in | |
/// the data store, and then, continue with the regular flow. | |
/// After retrieving all blogs, this method deletes the authorization code so it | |
/// won't be used in a next run. | |
/// </summary> | |
public async void ContinueWebAuthentication( | |
WebAuthenticationBrokerContinuationEventArgs args) | |
{ | |
await PasswordVaultDataStore.Default.StoreAsync<WebAuthResult>( | |
WebAuthResult.Name, new WebAuthResult(args.WebAuthenticationResult)); | |
await ((BlogsViewModel)this.DataContext).GetBlogsAsync(); | |
await PasswordVaultDataStore.Default.DeleteAsync<WebAuthResult>(WebAuthResult.Name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment