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
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/shopify_app/sessions_concern.rb', line 17 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
13 14 15 |
# File 'lib/shopify_app/sessions_concern.rb', line 13 def create authenticate end |
#destroy ⇒ Object
31 32 33 34 35 36 |
# File 'lib/shopify_app/sessions_concern.rb', line 31 def destroy session[:shopify] = nil session[:shopify_domain] = nil flash[:notice] = I18n.t('.logged_out') redirect_to_with_fallback login_url end |
#new ⇒ Object
9 10 11 |
# File 'lib/shopify_app/sessions_concern.rb', line 9 def new authenticate if params[:shop].present? end |