Class: DiscoApp::UserSessionsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Concerns::AuthenticatedController
Defined in:
app/controllers/disco_app/user_sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#callbackObject



12
13
14
15
16
17
18
19
# File 'app/controllers/disco_app/user_sessions_controller.rb', line 12

def callback
  if auth_hash
    
    redirect_to return_address
  else
    redirect_to root_path
  end
end

#createObject



8
9
10
# File 'app/controllers/disco_app/user_sessions_controller.rb', line 8

def create
  authenticate
end

#destroyObject



21
22
23
24
# File 'app/controllers/disco_app/user_sessions_controller.rb', line 21

def destroy
  session[:shopify_user] = nil
  redirect_to root_path
end

#newObject



4
5
6
# File 'app/controllers/disco_app/user_sessions_controller.rb', line 4

def new
  authenticate if sanitized_shop_name.present?
end