1

I'm trying to implement sign in with Google using Oauth (using DotNetOpenAuth). I need to get user name, Id and email from Google. Basically I can get all the info apart from the email from Profile Information requesting access for this scope: https://www.googleapis.com/auth/userinfo.profile

Unfortunately it doesn't return user email. I know that I can get user email requesting access to contacts, but I don't want to ask for such access.

Is it possible? Where can I read about what profile information is accessible via api. I found this scope uri here on SO, it works, but I can't fing anything about it in Google api docs.

Thanks

Burjua
  • 12,506
  • 27
  • 80
  • 111

1 Answers1

4

Ok, I found the solution partly in this question: Require Google to return email address as part of OAuth

So basicly I asking for access to basic info and email using this urls:

https://www.googleapis.com/auth/userinfo.profile

https://www.googleapis.com/auth/userinfo.email

and then quering the data using this url:

https://www.googleapis.com/oauth2/v1/userinfo

I'm using DotNetOpenAuth, which has examples so it is not so difficult to do

Community
  • 1
  • 1
Burjua
  • 12,506
  • 27
  • 80
  • 111