public async Task testAsync() { GoogleService googleS = new GoogleService(); // use your token here var email = await googleS.GetEmailAsync("", ""); Console.WriteLine(email); }
private async void OnGoogleAuthCompleted(object sender, AuthenticatorCompletedEventArgs e) { this.DismissViewController(true, null); var googleService = new GoogleService(); var email = await googleService.GetEmailAsync(e.Account.Properties["token_type"], e.Account.Properties["access_token"]); GoogleButton.SetTitle(email, UIControlState.Normal); }
public async void OnAuthenticationCompleted(GoogleOAuthToken token) { // Retrieve the user's email address var googleService = new GoogleService(); var email = await googleService.GetEmailAsync(token.TokenType, token.AccessToken); ViewModel.ShowHomeViewModelCommand.Execute(null); ViewModel.AddUserToTable(email); }
private async void OnGoogleAuthCompleted(object sender, AuthenticatorCompletedEventArgs e) { var googleService = new GoogleService(); var email = await googleService.GetEmailAsync(e.Account.Properties["token_type"], e.Account.Properties["access_token"]); var googleButton = FindViewById <Button>(Resource.Id.googleButton); googleButton.Text = email; }
public async void OnAuthenticationCompleted(GoogleOAuthToken token) { // SFSafariViewController doesn't dismiss itself DismissViewController(true, null); var googleService = new GoogleService(); var email = await googleService.GetEmailAsync(token.TokenType, token.AccessToken); GoogleLoginButton.SetTitle($"Connected with {email}", UIControlState.Normal); }
public async void OnAuthenticationCompleted(GoogleOAuthToken token) { DismissViewController(true, null); var googleService = new GoogleService(); var email = await googleService.GetEmailAsync(token.TokenType, token.AccessToken); ViewModel.AddUserToTable(email); ViewModel.ShowHomeViewModelCommand.Execute(null); }
public async void OnAuthenticationCompleted(GoogleOAuthToken token) { // Retrieve the user's email address var googleService = new GoogleService(); var email = await googleService.GetEmailAsync(token.TokenType, token.AccessToken); // Display it on the UI var googleButton = FindViewById <Android.Widget.Button>(Resource.Id.googleLoginButton); googleButton.Text = $"Connected with {email}"; }
public async void OnAuthenticationCompleted(GoogleOAuthToken token) { var intent = new Intent(this, typeof(MainActivity)); intent.SetFlags(ActivityFlags.ClearTop | ActivityFlags.SingleTop); StartActivity(intent); // Retrieve the user's email address var googleService = new GoogleService(); var email = await googleService.GetEmailAsync(token.TokenType, token.AccessToken); // Display it on the UI var googleButton = FindViewById <Button>(Resource.Id.googleLoginButton); googleButton.Text = $"Connected with {email}"; var emailstr = googleButton.Text; //SetContentView(Resource.Layout.DashboardView); }