asimkumar2222 / openid-selector

Automatically exported from code.google.com/p/openid-selector
0 stars 0 forks source link

Support AJAX openid_immediate mode #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In addition to supporting form submission which will result in a browser 
redirect, the client selector should also support an AJAX workflow.

In this workflow, the user clicks on a provider and when AJAX is enabled a 
quick Javascript call is made to the server. The server makes an 
openid_immediate mode call to the provider to see if the user can be 
authenticated (because they logged in recently) without bothering to 
redirect the browser to the provider's page at all.

If the user can be authenticated in this way, the server updates the user's 
session and replies to the client selector to say that the user is now 
successfully logged in.

If the user can't be authorised, the AJAX method should be notified and the 
client selector can decide (based on whether a developer's method replies 
with true or false) whether to just prompt the user with an error message, 
ask for confirmation to redirect the browser or just go ahead and redirect 
the browser (default behaviour).

This feature will degrade nicely when Javascript is not available. It'll 
just not be available. The feature will be disabled by default.

In the best case scenario, this feature allows the user to be authenticated  
in a split-second without the browser page having to be refreshed at all.

We'll have to take care with providers like Google where you don't provide 
your username up front. The user may need a way of saying "log me into 
Google, but not as the user that I'm currently logged in with". This is a 
pretty rare use case, though.

Original issue reported on code.google.com by david.j....@googlemail.com on 29 Apr 2009 at 7:57

GoogleCodeExporter commented 9 years ago

Original comment by david.j....@googlemail.com on 29 Apr 2009 at 9:02