DotNetOpenAuth - How to execute a script function in the parent page instead of a redirect
===

I have implemented OpenID authentication for an MVC3 web application, using DotNetOpenAuth, by following the pattern in the <a href="http://www.nerddinner.com/">NerdDinner</a> code sample.

This works fine, but I now want to evolve the design to create a slightly different workflow. 

The current (NerdDinner) design uses a dedicated login page that launches a popup window, in which the user approves OpenID authentication, after which the popup window closes and the parent window is redirected to a designated target page.

Instead of the popup window redirecting its parent window, I want a script function in the parent page to be called. This will execute an AJAX request that performs a partial page update.

Having studied the DotNetOpenAuth operation using Fiddler, I can see that the popup window currently calls JavaScript function <code>dnoa_internal.processAuthorizationResult()</code> in the parent page. This script is delivered as a return value by the <code>ProcessResponseFromPopup()</code> method.

So, although I could probably hack the DotNetOpenAuth code to get it to do what I want, I am hoping that there is a configuration that would achieve my goals out-of-the-box.

Does anyone have an idea how to do this?

Thanks in advance,

Tim