Module: ShopifyApp::SessionsConcern
- Extended by:
- ActiveSupport::Concern
- Included in:
- SessionsController
- Defined in:
- lib/shopify_app/sessions_concern.rb
Instance Method Summary collapse
Instance Method Details
#callback ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/shopify_app/sessions_concern.rb', line 18 def callback if auth_hash login_shop install_webhooks flash[:notice] = I18n.t('.logged_in') redirect_to return_address else flash[:error] = I18n.t('could_not_log_in') redirect_to login_url end end |
#create ⇒ Object
14 15 16 |
# File 'lib/shopify_app/sessions_concern.rb', line 14 def create authenticate end |
#destroy ⇒ Object
32 33 34 35 36 37 |
# File 'lib/shopify_app/sessions_concern.rb', line 32 def destroy session[:shopify] = nil session[:shopify_domain] = nil flash[:notice] = I18n.t('.logged_out') redirect_to login_url end |
#new ⇒ Object
10 11 12 |
# File 'lib/shopify_app/sessions_concern.rb', line 10 def new authenticate if sanitized_shop_name.present? end |