authlogic-connect
authlogic-connect copied to clipboard
issue with params not actually being passed via UserSession constructor
in the example app, the params for UserSessionsController#create are processed via
@user_session = UserSession.new(params[:user_session])
however the form in the example has the params bare. when i change them to be scoped via user_session things break.
I think that's because authlogic connect is not actually using the params passed to UserSession. It looks like it reads the params directly from the controller here: AuthlogicConnect::Common::Variables#auth_params
I'll look into this, thanks.
can you describe the expected result/functionality? In the Rails 3 example app, params[:user_session]
is nil, and the rest we handle in the background. What exactly are you trying to do?
Thanks.
yeah it seems odd that its being handled in the background as that breaks the interface expected with authlogic. seems like it would be clearer to pass the params through the UserSession constructor... at least expectation and the code in the controller seem to indicate that the call to the constructor would handle the params. otherwise it should just be @user_session = UserSession.new without any arguments. i'm trying to find a way to handle passing login/email/password so we can support traditional login in parallel with oauth/openid.
cool, makes sense. There's a lot to clean up there. After realizing, with oauth, creating a user and "connecting with facebook" (aka creating a session) are basically one thing, I started just creating the user through the session (self.attempted_record = klass.new
...). Makes it easier, but then this pops up :). Thanks for the help.
Lance
I'll add to this that options for the UserSession (particularly: remember_me) get lost in the OAuth process. Is there a good way to stash those options to be recovered when the handshake comes back?
-Andrew
I'd second this. I've got multiple users for one Account in my app so I need to pass the account record in so I can relate the two but because the params get over-written I can't.
Rich