ASP.NET MVC4 Google oAuth

I am trying to set up Google oAuth in an MVC 4 project. Its completely right out of the box for Great Hanslemans video

I can register, log in, log out, etc., but the only information I have is an email address. Id like being able to get first name, last name and image from google

This blog says it’s possible - but when I look at all this is available, it’s an email address. This is obvious since this is all we asked for permission.

So my question is: how can I get more information from Google and how can I access it. I know that he could write my own access to OAuth, but I assume that he can use the code from MVC 4 code.

Thank you very much in advance

+5
source share
1 answer

I think this falls under the error that is in the package DotNetOpenAuth.AspNet version = "4.0.3.12153". You need to write your own service provider, and then you can get data from this

http://blogs.msdn.com/b/pranav_rastogi/archive/2012/08/23/plugging-custom-oauth-openid-providers.aspx

You can use GetExtraData to get the data you are looking for!

+3
source

All Articles