Class: ShopifyApp::SessionsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ShopifyApp::SessionsController
show all
- Includes:
- LoginProtection, RedirectForEmbedded
- Defined in:
- app/controllers/shopify_app/sessions_controller.rb
Constant Summary
LoginProtection::ACCESS_TOKEN_REQUIRED_HEADER
Instance Method Summary
collapse
#activate_shopify_session, #add_top_level_redirection_headers, #current_shopify_session, #jwt_expire_at, #login_again_if_different_user_or_shop, #signal_access_token_required
Instance Method Details
#create ⇒ Object
18
19
20
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 18
def create
authenticate
end
|
#destroy ⇒ Object
27
28
29
30
31
32
33
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 27
def destroy
reset_session
flash[:notice] = I18n.t(".logged_out")
ShopifyApp::Logger.debug("Session destroyed")
ShopifyApp::Logger.debug("Redirecting to #{login_url_with_optional_shop}")
redirect_to(login_url_with_optional_shop)
end
|
#new ⇒ Object
14
15
16
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 14
def new
authenticate if sanitized_shop_name.present?
end
|
#top_level_interaction ⇒ Object
22
23
24
25
|
# File 'app/controllers/shopify_app/sessions_controller.rb', line 22
def top_level_interaction
@url = login_url_with_optional_shop(top_level: true)
validate_shop_presence
end
|