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



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

def callback
  if auth_hash
    
    redirect_to return_address
  else
    redirect_to root_path
  end
end

#createObject



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

def create
  authenticate
end

#destroyObject



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

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

#newObject



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

def new
  authenticate if sanitized_shop_name.present?
end