Open tquensen opened 12 years ago
Works now with google+ :)
I have changed the getIdentifier method to use only a single call. The required scope is "https://www.googleapis.com/auth/userinfo.profile" (and optionally "https://www.googleapis.com/auth/userinfo.email" for the email") I also added a new namespace 'oauth2' => 'https://www.googleapis.com/oauth2/v1' to get the userinfo. https://www.googleapis.com/oauth2/v1/userinfo doesn't return as much data as a call to the google+ profile, but you get a unique identifier for every google user, even for those without google+ profile
I´m using this file version but doesn´t works
@zarpax what exactly "doesn´t work"? Some more information would be helpful :)
@tquensen, Sorry for the delay. I've been making new tries and all works ok. In my first try I couldn't connect with google (Token error)
There was no useful way to get basic user info for google accounts, so a added some changes:
a new "userinfo" namespace in the google class: https://www.googleapis.com/userinfo the required scope is "https://www.googleapis.com/auth/userinfo.email", so this does not work with the api config (for whatever reason, scope is different to namespace)
As this is not the default namespace, i added a parameter "namespace" to use with the user configuration.
So, to authenticate with google and retrieve the email, use this config: