How to Save User Credentials using GTM-OAuth2

113 views
Skip to first unread message

naresh...@gritinnovation.com

unread,
Apr 29, 2013, 7:16:00 AM4/29/13
to gdata-objec...@googlegroups.com
Hi greg,

i am new to GTM-OAuth2 , i am using it for my IOS application and i need to save the user credentials username and password or only username(something like cookies in normal browser).

When a user loggs in using GTM-OAuth2 for gmail , the credentials have to be stored , and when user wants to login for the second time , when user tries to enter the id in the username Textfield in gmail login page , it should show a drop down list with emailId's of previously logged in users.

How can i achieve it. Please help me out in this ASAP.

Greg Robbins

unread,
Apr 29, 2013, 5:26:58 PM4/29/13
to gdata-objec...@googlegroups.com
gtm-oauth2 provides the email address of the signed-in user via the userEmail property, but does not support pre-filling the email field of the sign in page. Since the sign in page is html delivered by the server, it cannot be safely modified by the app.

Support for retrieving a user's authorization from the keychain when the app restarts is documented at


naresh...@gritinnovation.com

unread,
Apr 30, 2013, 5:27:59 AM4/30/13
to gdata-objec...@googlegroups.com
thanks greg for the reply , 

can i know how to retrive first name and last name for the google profile????

Greg Robbins

unread,
Apr 30, 2013, 8:39:11 PM4/30/13
to gdata-objec...@googlegroups.com
When signing in to Google services, setting the shouldFetchGoogleUserProfile property of the signIn object (available from the view controller) before showing the view controller will retrieve a profile of the user information, including the full name.
Reply all
Reply to author
Forward
0 new messages