Class: SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- SessionsController
- Defined in:
- lib/generators/omniauth_initializer/templates/sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
The callback from logging in with facebook or twitter will hit this action.
Instance Method Details
#create ⇒ Object
The callback from logging in with facebook or twitter will hit this action. All logic for what you will do with the omniauth response hash goes here.
4 5 6 7 8 |
# File 'lib/generators/omniauth_initializer/templates/sessions_controller.rb', line 4 def create #@user = User.find_or_create_from_auth_hash(auth_hash) #self.current_user = @user #redirect_to '/' end |