J'ai implémenté avec succès l'authentification en utilisant la bibliothèque GTM OAuth 2. Mais maintenant je veux avoir l'identifiant d'email de l'user. Comment dois-je procéder. Je sais que je dois appeler quelque chose ici: –
- (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error { if (error != nil) { NSLog(@"SIGN IN ERROR : %@", error.description); // Authentication failed } else { // Authentication succeeded }
}
Lorsque vous vous connectez aux services Google avec gtm-oauth2, l'adresse e-mail de l'user est disponible après connection dans la propriété userEmail
l'object auth.