x1ddos / simpleauth

Simple authentication for Python on Google App Engine supporting OAuth 2.0, OAuth 1.0(a) and OpenID
https://simpleauth.appspot.com
327 stars 61 forks source link

Update the OAuth2 Google endpoint to v3 #19

Closed elsigh closed 11 years ago

elsigh commented 11 years ago

In v1 the Google endpoint returns verified_email instead of email_verified (the latter is correct and matches the spec)

erichiggins commented 11 years ago

LGTM

erichiggins commented 11 years ago

@elsigh Are there docs that you could link to that specify this change on Google's end?

elsigh commented 11 years ago

I don't know of any that specifically mention this difference - I got the info from Tim Bray directly.

But v3 is the url in the current doc here: https://developers.google.com/accounts/docs/OAuth2Login#obtaininguserprofileinformation

On Thu, Jun 13, 2013 at 3:26 PM, Eric Higgins notifications@github.comwrote:

@elsigh https://github.com/elsigh Are there docs that you could link to that specify this change on Google's end?

— Reply to this email directly or view it on GitHubhttps://github.com/crhym3/simpleauth/pull/19#issuecomment-19429135 .

x1ddos commented 11 years ago

Wow, we're already at v3. Thanks @elsigh!

Interesting, I've just tried it with v3 and noticed a couple fields have changed: id is now sub and link is now profile. You can see it by logging in the demo app: https://simpleauth.appspot.com/

So, I updated the code accordingly: https://github.com/crhym3/simpleauth/commit/2804b54f371729d4da9579aa0252205c54da633c

What do you guys think, is it stable or sub might be going back to id? I couldn't find info about v3, probably it isn't published yet but I thought you might have more info.

x1ddos commented 11 years ago

Actually, you can see it just using a browser (the id to sub change): https://www.googleapis.com/oauth2/v3/userinfo?access_token=my_token