Class: OmniauthCallbacksController

Inherits:
Devise::OmniauthCallbacksController
  • Object
show all
Defined in:
app/controllers/omniauth_callbacks_controller.rb

Instance Method Summary collapse

Instance Method Details

#facebookObject



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?
     @user, :event => :authentication
  end
end

#linked_inObject



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?
     @user, :event => :authentication
  end
end