Class: ShopifyApp::SessionsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ShopifyApp::SessionsController
show all
- Includes:
- LoginProtection
- Defined in:
- app/controllers/shopify_app/sessions_controller.rb
Instance Method Summary
collapse
#login_again_if_different_shop, #shop_session, #shopify_session
Instance Method Details
#callback ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 17
def callback
if auth_hash
login_shop
install_webhooks
install_scripttags
perform_after_authenticate_job
redirect_to return_address
else
flash[:error] = I18n.t('could_not_log_in')
redirect_to login_url
end
end
|
#create ⇒ Object
13
14
15
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 13
def create
authenticate
end
|
#destroy ⇒ Object
31
32
33
34
35
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 31
def destroy
reset_session
flash[:notice] = I18n.t('.logged_out')
redirect_to login_url
end
|
#new ⇒ Object
9
10
11
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 9
def new
authenticate if sanitized_shop_name.present?
end
|