Class: DuodealerApp::CallbackController

Inherits:
ApplicationController
  • Object
show all
Includes:
LoginProtection
Defined in:
app/controllers/duodealer_app/callback_controller.rb

Overview

Performs login after OAuth completes

Instance Method Summary collapse

Methods included from LoginProtection

#account_session, #duodealer_session, #login_again_if_different_user_or_account

Instance Method Details

#callbackObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/duodealer_app/callback_controller.rb', line 8

def callback
  if auth_hash
    
    install_webhooks
    install_scripttags
    perform_after_authenticate_job

    redirect_to return_address
  else
    flash[:error] = I18n.t("could_not_log_in")
    redirect_to()
  end
end