Module: Faalis::Omniauth::Callbacks

Included in:
CallbacksController
Defined in:
lib/faalis/omniauth/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#default_service_callbackObject



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/faalis/omniauth/callbacks.rb', line 26

def default_service_callback

  create_or_find_user

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