0

I have successfully implemented authentication using GTM OAuth 2 library. But now I want to have the email id of the user. How should I proceed. I know I have to call something in here :-

- (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController
  finishedWithAuth:(GTMOAuth2Authentication *)auth
             error:(NSError *)error {
if (error != nil) {

    NSLog(@"SIGN IN ERROR : %@", error.description);
    // Authentication failed
} else {
    // Authentication succeeded
}

}

Cœur
  • 37,241
  • 25
  • 195
  • 267
Arup Saha
  • 526
  • 2
  • 7
  • 15

1 Answers1

1

When signing in to Google services with gtm-oauth2, the user's email address is available after sign-in in the auth object's userEmail property.

grobbins
  • 1,564
  • 1
  • 8
  • 6