I have a Ruby on Rails 3.0.7 application and my user authentication with devisebut and I have an alternative sign up and sign in methods, I allow my users to sign up using their Facebook account then I save that login info in my users table the same one that devise uses to register and login users.
Steps
- ✔ User click on the Facebook button.
- ✔ I save his info (name and email extracted from
Koala) I give the user a generic password. - ☐ Login this new user with devise.
- ✔ Redirect to my main controller.
I'm just missing the 3rd step because I want to keep using the current_user helper and the user_signed_in? helper too.
So how do I tell devise to sign in this user automatically from my other controller?
I saw something like that on this question Devise: Have multiple controllers handle user sessions and it logs my user in but leads me to an blank page...