hi i am trying to setup DotNetOpenAuth using the OpenIdAjaxTextBox but i have two problems
i want to be able to get the users email address and i think that is done in the loggedin event (right?) but that event is never called, i have tried to setup a breakpoint there but i never get to it.
when I type in the openid provider in the OpenIdAjaxTextBox (lets say Gmail), I get the login button in the textbox so I click on it a new windows pops up and displayes the Gmail login form but after that i type my username and password and click on login that popup window refresh and my own website loads in that popup window, i would expect the pop up window to close after I login not redirect me to my site.
here is the code I using
<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty"
TagPrefix="openid" %>
<openid:OpenIdAjaxTextBox ID="OpenIdAjaxTextBox1" runat="server"
OnLoggingIn="openIdtxtbx_LoggingIn"
OnLoggedIn="openIdtxtbx_LoggedIn"
OnClientAssertionReceived="onauthenticated(sender)"
OnUnconfirmedPositiveAssertion="openIdtxtbx_UnconfirmedPositiveAssertion" />
Protected Sub openIdtxtbx_LoggedIn(ByVal sender As Object, ByVal e As OpenIdEventArgs)
' Do something here
Dim claimedId As String = e.Response.Status
End Sub
Protected Sub openIdtxtbx_LoggingIn(ByVal sender As Object, ByVal e As OpenIdEventArgs)
' Retrieve the email address of the user
Dim c As New ClaimsRequest
c.Email = DemandLevel.Require
e.Request.AddExtension(c)
End Sub
Protected Sub openIdtxtbx_UnconfirmedPositiveAssertion(ByVal sender As Object, ByVal e As OpenIdEventArgs)
' This is where we register extensions that we want to have available in javascript
' on the browser.
OpenIdAjaxTextBox1.RegisterClientScriptExtension(Of ClaimsResponse)("sreg")
End Sub