I am trying to use DotNetOpenAuthto authenticated user which I am able to do. But I am not able to figure out a way to get additional parameters like email, firstname, lastname etc which are provided by the google.
The code snippet which I am using is:
<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty" TagPrefix="rp" %>
………………………….
<rp:OpenIdButton runat="server" ID="OpenIdTextButton1"
OnLoggedIn="OpenIdTextBox1_LoggedIn"
Text="aaaa"
Identifier="https://www.google.com/accounts/o8/id"
/>
Several hints in my blog post How to pretty much guarantee that you might get an email address with OpenID.
In short, you need to activate the AXFetchAsSregTransform behavior:
And then you need to tell the Provider that you require the user’s email address. Ideally this would be done like this:
However there is a bug in DotNetOpenAuth (v3.4.7 fixes this) that keeps the
<Extensions>tag from working onOpenIdButton. So instead, you must add the attribute request in your code-behind. So your tag looks like:And your code-behind has this method: