Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with params not actually being passed via UserSession constructor #22

Open
stephenhandley opened this issue Jul 12, 2010 · 6 comments

Comments

@stephenhandley
Copy link

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

@lancejpollard
Copy link
Owner

I'll look into this, thanks.

@lancejpollard
Copy link
Owner

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.

@stephenhandley
Copy link
Author

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.

@lancejpollard
Copy link
Owner

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

@aac
Copy link
Contributor

aac commented Sep 8, 2010

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

@jkale
Copy link

jkale commented Jan 21, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants