Getting userEmail nil after successful authentication with replaces library GTMAppAuth.

139 views
Skip to first unread message

YiOSM

unread,
Jul 31, 2017, 8:53:52 AM 7/31/17
to GTM OAuth 2 Discussion
Hi,

I have replaced my old autherisation gtmoauth2 with GTMAppAuth. after that i want pass user email id as a input parameter to the mailcore2 library to fetch email and i got access token also. Now i want to know do i need to implement any GET methods to get user email or GTMAppAuth contains properties of user email how can i get user email.

print( "access Token : \ ( String(describing: authState!.lastTokenResponse!.accessToken!) )" ) //success prints access token


self .auth = GTMAppAuthFetcherAuthorization(authState: authState!)   // auth is a  GTMAppAuthFetcherAuthorization 

print( "user email = \ ( auth.userEmail! )" ) // here i want to access user email from auth variable // prinitng nil value here

Thomas Van Lenten

unread,
Aug 1, 2017, 9:25:50 AM 8/1/17
to GTM OAuth 2 Discussion
You likely want to check the issues on GTMAppAuth and maybe open a new issue there.  Doing a quick search of the issues there, it seems like  https://github.com/google/GTMAppAuth/issues/12 might apply, so gtm-oauth2 used to auto add the scope, but it seems like you might need to manually add the scope yourself.

TVL

canca...@gmail.com

unread,
Mar 30, 2019, 7:57:06 PM 3/30/19
to GTM OAuth 2 Discussion
Hayır
Reply all
Reply to author
Forward
0 new messages