Module: Underworld::Omniauth::Callbacks

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

Instance Method Summary collapse

Instance Method Details

#default_service_callbackObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/underworld/omniauth/callbacks.rb', line 7

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