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
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/shopify_app/sessions_concern.rb', line 13 def callback if auth_hash login_shop install_webhooks flash[:notice] = I18n.t('.logged_in') redirect_to_with_fallback return_address else flash[:error] = I18n.t('could_not_log_in') redirect_to_with_fallback login_url end end |
#create ⇒ Object
9 10 11 |
# File 'lib/shopify_app/sessions_concern.rb', line 9 def create authenticate end |
#destroy ⇒ Object
27 28 29 30 31 32 |
# File 'lib/shopify_app/sessions_concern.rb', line 27 def destroy session[:shopify] = nil session[:shopify_domain] = nil flash[:notice] = I18n.t('.logged_out') redirect_to_with_fallback login_url end |
#new ⇒ Object
5 6 7 |
# File 'lib/shopify_app/sessions_concern.rb', line 5 def new authenticate if params[:shop].present? end |