Re: Accessing user email and other info

47 views
Skip to first unread message

Greg Robbins

unread,
Mar 19, 2013, 7:10:19 PM3/19/13
to gtm-o...@googlegroups.com
After signing in to a Google account, the GTMOAuth2Authentication object has the user's email address in its userEmail property. The user's email address is also saved with the OAuth 2 refresh token to the keychain.

Additional user profile information is available if a property is set on the GTMOAuth2SignIn object prior to displaying the view controller:

  viewController.signIn.shouldFetchGoogleUserProfile = YES

Then immediately following the user's successful sign-in, the sign-in object's userProfile property will have a dictionary of additional user details. Unlike the user's email address, the profile details are not saved to the keychain by the library.


There is no support for obtaining user email or profile information from services other than Google, since user details are not covered by the OAuth 2 protocol, unfortunately.

Reply all
Reply to author
Forward
0 new messages