Class: Auth::HandlerController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/phcdevworks_accounts_auth0/auth/handler_controller.rb

Instance Method Summary collapse

Instance Method Details

#callbackObject



4
5
6
7
8
# File 'app/controllers/phcdevworks_accounts_auth0/auth/handler_controller.rb', line 4

def callback
  auth_info = request.env["omniauth.auth"]
  session[:userinfo] = auth_info["extra"]["raw_info"]
  redirect_to "/"
end

#failureObject



10
11
12
# File 'app/controllers/phcdevworks_accounts_auth0/auth/handler_controller.rb', line 10

def failure
  @error_msg = request.params["message"]
end

#logoutObject



14
15
16
17
# File 'app/controllers/phcdevworks_accounts_auth0/auth/handler_controller.rb', line 14

def logout
  reset_session
  redirect_to logout_url, allow_other_host: true
end