Hi there, I am trying to use the OpenID authentication plugin of DHH in conjuction with ruby-openid 2.1.2 gem put it seems there is a problem because in my login action the plugin redirects me to the openid provider and then i have the exception when i have to render or redirect to another page The exception is: ActionController::DoubleRenderError (Can only render or redirect once per action): Have you even encountered smth like that ? Thank you PS my session starts successfully the problem is that it does not refresh the page or redirect somewhere so i have to do it manually to see tha i am logged in --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You might want to take a look at the OpenID Rails Kit ( http://railskits.com/openid/), which gives you a Rails sample app with the openid plugin integrated with the restful_authentication plugin so you can have both types of logins, ready to go. -- Benjamin Curtis http://railskits.com/ - Ready-made Rails code http://catchthebest.com/ - Team-powered recruiting http://www.bencurtis.com/ - Personal blog On Sun, Nov 23, 2008 at 5:14 AM, PanosJee <papado-Y8qEzhMunLxMo1R+fwTmgw@public.gmane.org> wrote:> > Hi there, I am trying to use the OpenID authentication plugin of DHH > in conjuction with ruby-openid 2.1.2 gem put it seems there is a > problem because in my login action the plugin redirects me to the > openid provider and then i have the exception when i have to render or > redirect to another page > The exception is: > ActionController::DoubleRenderError (Can only render or redirect once > per action): > > Have you even encountered smth like that ? > > Thank you > > PS my session starts successfully the problem is that it does not > refresh the page or redirect somewhere so i have to do it manually to > see tha i am logged in > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I second Ben, check out a working demonstration application and see what you are doing different. It sounds like you may be doing some rendering outside of the authenticate_with_open_id block, but its hard to say without seeing your code. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ok guys i ll give a second look, the strange thing is tha my current setup works but i am rewriting to port it Rails 2.x.x but somethings goes fundamendally wrong. So far the problem is that OpenID redirects as it should do but then i cannot redirect back to index and say hello user --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
What I have in my log is: OpenIdAuthentication::Association Load (0.000810) SELECT * FROM `open_id_authentication_associations` WHERE (`open_id_authentication_associations`.`server_url` = ''http:// www.myopenid.com/server'') Redirected to http://www.myopenid.com/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B492c6b8f%7D%7Bat%2BLWQ%3D%3D%7D&openid.claimed_id=http%3A%2F%2F6pna.com%2F&openid.identity=http%3A%2F%2Fpanosjee.myopenid.com%2F&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.realm=http%3A%2F%2F127.0.0.1%3A3000%2F&openid.return_to=http%3A%2F%2F127.0.0.1%3A3000%2Flogin%2Fnow%3F_method%3Dpost%26open_id_complete%3D1 and then ActionController::DoubleRenderError (Can only render or redirect once per action): /Library/Ruby/Gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ base.rb:842:in `render_with_no_layout'' It fails only when openid url is correct, quite strange --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Just in case anyone stumbs on this thread again: You should go exactly what the sample code does and that is why the plugin is looking for a identity_url or openid_url param So in your form there should be a an input with name anything like user [identity_url] wont do! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---