Class: Faalis::Omniauth::CallbacksController

Inherits:
Devise::OmniauthCallbacksController
  • Object
show all
Includes:
Callbacks
Defined in:
app/controllers/faalis/omniauth/callbacks_controller.rb

Instance Method Summary collapse

Methods included from Callbacks

#default_service_callback

Instance Method Details

#facebookObject

Create a method for each service you want to override If you do not provide a method a default one will used Here is facebook method for an example



27
28
29
30
31
32
33
34
35
36
37
# File 'app/controllers/faalis/omniauth/callbacks_controller.rb', line 27

def facebook
  create_or_find_user

  if @user.persisted?
     @user, :event => :authentication #this will throw if @user is not activated
    set_flash_message(:notice, :success, :kind => "Facebook") if is_navigational_format?
  else
    session["devise.facebook_data"] = request.env["omniauth.auth"]
    redirect_to new_user_registration_url
  end
end