1

Does anybody have resources to get the additional OAuth information {first name, last name, profile picture} from when using webforms from this template? https://github.com/rustd/ASPNETTemplates

I have searched for hours on trying to find examples and nothing has shown to work. I tried adding the extradata parameter but that errors

        //Dictionary<string, string> googleExtraData = new Dictionary<string, string>
        //    {
        //        {"email", WellKnownAttributes.Contact.Email},
        //        {"country", WellKnownAttributes.Contact.HomeAddress.Country},
        //        {"firstName", WellKnownAttributes.Name.First},
        //        {"lastName", WellKnownAttributes.Name.Last}
        //    };
        //googleExtraData.Add("Icon", "GoogleLogin.png");


        OpenAuth.AuthenticationClients.AddGoogle();
4

1 回答 1

0

我找到了这个信息。看来您必须构建自己的自定义类才能在此处获取附加信息:http: //blogs.msdn.com/b/webdev/archive/2012/08/23/plugging-custom-oauth-openid-providers.aspx

于 2015-09-18T08:24:56.060 回答