Class: ShopifyApp::CallbackController

Inherits:
ActionController::Base
  • Object
show all
Includes:
LoginProtection
Defined in:
app/controllers/shopify_app/callback_controller.rb

Overview

Performs login after OAuth completes

Instance Method Summary collapse

Methods included from LoginProtection

#login_again_if_different_shop, #shop_session, #shopify_session

Instance Method Details

#callbackObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/shopify_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