Class: ShopifyApp::CallbackController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ShopifyApp::CallbackController
- 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
#activate_shopify_session, #current_shopify_session, #login_again_if_different_user_or_shop, #shop_session, #user_session
Instance Method Details
#callback ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/shopify_app/callback_controller.rb', line 8 def callback if auth_hash login_shop if ShopifyApp::SessionRepository.user_storage.present? && user_session.blank? return redirect_to(login_url_with_optional_shop) end install_webhooks perform_after_authenticate_job redirect_to return_address else flash[:error] = I18n.t('could_not_log_in') redirect_to(login_url_with_optional_shop) end end |