Class: OmniauthCallbacksController
- Inherits:
-
Devise::OmniauthCallbacksController
- Object
- Devise::OmniauthCallbacksController
- OmniauthCallbacksController
- Defined in:
- app/controllers/omniauth_callbacks_controller.rb
Instance Method Summary collapse
Instance Method Details
#facebook ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/controllers/omniauth_callbacks_controller.rb', line 2 def facebook #print env['omniauth.auth'] @user = User.find_or_create_for_facebook_oauth(env['omniauth.auth'],current_user) if @user.persisted? sign_in_and_redirect @user, :event => :authentication end end |
#linked_in ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/controllers/omniauth_callbacks_controller.rb', line 10 def linked_in #print env['omniauth.auth'] @user = User.find_or_create_for_linkedin_oauth(env['omniauth.auth'],current_user) if @user.persisted? sign_in_and_redirect @user, :event => :authentication end end |