[Code] Rails + JQuery + ruby-openid = BZZZZT!
Rick Wayne
fewayne at wisc.edu
Wed May 30 19:39:24 UTC 2012
Hey all,
Pardon if this is a FAQ, but I've been hunting around for an answer and am still baffled.
I have a Ruby on Rails 3.0 application which happily uses the ruby-openid gem to perform delegated authentication. Works great.
However, some of the views in the application use JQuery, specifically JQGrid data-driven elements. And when the user does certain things, the grid obligingly fires off a POST back to the server.
Which does a redirect to the OpenID provider, as if this user had not already authenticated and gotten a session running. ???
Furthermore, the redirect just dies at that point, the Javascript doing the post never follows the redirect and so the POST never gets to my server. It looks as if it just gives up when the auth code in my app returns the 401 that's supposed to kick off the OpenID dance.
Now, perhaps the easy answer is "Well, it's JQuery's problem, mate". But I can't believe that I'm the first person to ever try this kind of thing, which makes me think that it's not JQuery's problem so much as my problem, that I've missed something blindingly obvious (like unknowingly running afoul of cross-site scripting defenses).
If y'all could point me to the path of righteousness, that would delight the people funding my project no end. And thus, indirectly, my wife, who (trust me on this) is a very good person to keep happy.
TIA,
rw
UW Soil Science
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openid.net/pipermail/openid-code/attachments/20120530/f145befb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7351 bytes
Desc: not available
URL: <http://lists.openid.net/pipermail/openid-code/attachments/20120530/f145befb/attachment.p7s>
More information about the Code
mailing list