I been looking at nerd dinner 2.0 and I see that for their openid they like a an ajax request. I know you can’t go full ajax style(ie I can’t stick the webpage in a jquery ui dialog) but you can open another window.
After some time looking at the nerd dinner code I can’t seem to figure out how they do it. I am wondering if anyone has a step by step tutorial on how to do this ajax style openid?
Thanks
I don’t know how it is done in NerdDinner but here’s a step by step tutorial I wrote to illustrate how you could achieve this using jQuery and ASP.NET MVC 3 (Razor view engine):
DotNetOpenAuthmodule (this will reference the proper assembly from the internet and add necessary configuration sections to your web.config).Add a HomeController:
and the corresponding
~/Views/Home/Index.cshtmlview:Next comes the important part the
LoginControllerwhich will handle the authentication:And the corresponding
~/Views/Login/Index.cshtmlpartial view:The example could be easily adapted to web forms view engine if this is what you are using. I’ve also intentionally left the fancy animations and CSS stuff in order to show the basics.