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

Does not log user in after doing a sign_in #13

Open
krzkrzkrz opened this issue Sep 29, 2010 · 5 comments
Open

Does not log user in after doing a sign_in #13

krzkrzkrz opened this issue Sep 29, 2010 · 5 comments

Comments

@krzkrzkrz
Copy link

This only happens when a user is registering for the first time.

Devise-twitter does not log the user in after navigating to /user/sign_in

It saves the user in the db, but does not log the user. To log the user in, the user would have to navigate to /user/sign_in a second time

Am I missing something or is this a bug?

@MSch
Copy link
Owner

MSch commented Sep 29, 2010

This is definitely a bug. I just updated the app I'm using devise-twitter on to warden 1.0 and am in the process of fixing this.

@krzkrzkrz
Copy link
Author

Great, just let me know when you are able to do so :-)

@krzkrzkrz
Copy link
Author

Hi MSch, any updates on this?

@daveio
Copy link

daveio commented Feb 13, 2011

Same again - any updates? Has anyone come up with a workaround?

@andflett
Copy link

When creating a user and signing in the order of events is a little out, the user isn't properly added to the database until after the sign in call is made. There's probably a better fix for this, but in the meantime you can edit rack.rb in your devise-twitter gem and add:

warden.set_user(strategy.user, :event => :authentication, :scope => scope)

... on line 20 (in short: duplicate line 19)

Seems this adds to user to the database and performs authentication, calling it twice doesn't seem to do any harm, and sorts out the issue.

Hackymchackson

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