简体   繁体   中英

How can I access Google+ user's email and pictures address through OWIN in ASP.NET 4.5 C#?

I am trying to SSO with google using the out of the box capabilities of OWIN in ASP.NET 4.5 web forms. I can successfully associate a login with a google account but I only get the username. I need the user's email address and their photo to generate an avatar. Do I need access to their Google+ account?

Anyone managed to do this?

Thank you

I personally don't know in details how OWIN performs authentication against Google+, but I know that to get the email address, your application should also explicitly request permission to email scope.

See https://developers.google.com/+/api/oauth for the scopes description

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM