Im trying to configure Google oAuth in an MVC 4 Project. Its quite straight forward out of the box as per Hanslemans Excellent Video
Im able to register, log on, log off etc, but the only information I have is the email address. Id like to be able to get the First Name, Last Name and Image from Google
This blog outlines that it is possible - but when I run through it all that is available is the email address. This is obvious as this is all we asked for permission for.
So my question is how do I ask for more information from Google and the how do I access it. I know its possible writing my own oAuth access but I assume its possible using the out of the box MVC 4 code.
Thanks very much in advance
I think this falls under a bug that is in DotNetOpenAuth.AspNet version="4.0.3.12153" package. You need to write your own customer provider and then you can get the data from that
http://blogs.msdn.com/b/pranav_rastogi/archive/2012/08/23/plugging-custom-oauth-openid-providers.aspx
You should be able to use GetExtraData to get the data you are looking for!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With