I am trying to implement OpenID for a website using only Google as the authentication provider. I am using the OpenIdButton control to send users to their Google Apps login since I always want them to go to the same place.
The button sends them to the right place and returns them to the ReturnToUrl correctly but it doesn't seem that the OnLoggedIn event ever fires. I am checking the event by setting a TextBox value in the method and I am seeing no change in the TextBox value. Here is my code...
<tr>
<td>
<asp:TextBox ID="devMsg" runat="server"/>
</td>
</tr>
<tr>
<td valign="top" align="center">
<font size="-1"><b>Sign in with your</b></font>
<br />
<br />
<rp:OpenIdButton ID="OpenIdButton1" runat="server" Text="Login with your Google account!"
ImageUrl="http://www.google.com/accounts/google_transparent.gif"
Identifier="https://www.google.com/accounts/o8/site-xrds?hd=dev.connexcloud.com"
ReturnToUrl="http://localhost:1587/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx"
OnLoggedIn="OpenIdLogin_LoggedIn" />
<br />
<br />
<font size="-1"><b>Account</b></font>
</td>
</tr>
protected void OpenIdLogin_LoggedIn(object sender, OpenIdEventArgs e)
{
this.devMsg.Text = "no response";
if (e.Response != null)
{
devMsg.Text = "response";
switch (e.Response.Status)
{
case AuthenticationStatus.Authenticated:
this.devMsg.Text = "authenicated";
break;
case AuthenticationStatus.Canceled:
this.devMsg.Text = "canceled";
break;
case AuthenticationStatus.Failed:
this.devMsg.Text = "failed";
break;
}
}
}
The TextBox is never being set to anything so it looks to me like the OpenIdLogin_LoggedIn call is never being made when the response is coming back from Google.