Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Get more info from users logged via Google

$
0
0

@LouisR wrote:

Hi

I am using this tutorial to log my users via Google+ (this tuto is really good by the way).

But I only get access to the user's email, and I would like to know if it is possible to get more info like his name, gender, etc... ?

Thanks

window.plugins.googleplus.login({
                //'scopes': 'profile'
            }, function (user_data) {
                // For the purpose of this example I will store user data on local storage
console.log(user_data)
                var response = user_data,
                    userr = {
                        _id: new Date().toISOString(),
                        authVia: 'google',
                        GId: response.userId,
                        name: response.displayName,
                        email: response.email,
                        picture: response.imageUrl,
                        firstName: response.given_name,
                        lastName: response.family_name,
                        accessToken: response.accessToken,
                        idToken: response.idToken,
                        gender: response.gender,
                        locale: response.locale,
                        link: response.link,
                        gVerified: response.verified_email
                    };
...

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>