-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting data out of AccessToken #28
Comments
Hey @quiKsilverItaly! This library is more meant to be used in the scenario where you send the access token to the backend, but in your scenario I can see how that's overkill as well. To get the email, you could make this API call manually:
It should return something like this: {
"sub": "113934915402034538610",
"name": "Edward Jiang",
"given_name": "Edward",
"family_name": "Jiang",
"profile": "https://plus.google.com/113934915402034538610",
"picture": "https://lh6.googleusercontent.com/-eOdaSp-2dHY/AAAAAAAAAAI/AAAAAAAAABU/Z8_UB6zN_4I/photo.jpg",
"email": "[email protected]",
"email_verified": true,
"gender": "male",
"locale": "en"
} So then you should be able to parse out the email! Make sure that you request the |
If you want to write some code for this, I'd definitely want to incorporate this into Simplicity in the future. See #15 |
@edjiang I used the same solution like you recommended. This solution only currently supports Google devicetokens, but the two classes can be easily expanded with Facebook devicetoken and more. |
Thanks! Yeah, the code to merge into Simplicity would take a little more work (no dependencies should be used, + this should be documented), but if it works for you I'm happy! =] |
Hello there,
thanks for this nice library.
The Google-Login works fine. Now I want to get the E-Mail-Information out of the AccessToken. Is this possible with your library? If not, what next step do you recommend? (For example picking up another library).
The thing is, getting the E-Mail out of access token is the only functionality I need, and using other Libs seems to be way too overkill for that.
Thanks in advance.
The text was updated successfully, but these errors were encountered: