Class: Capcoauth::LogoutController

Inherits:
ApplicationController show all
Defined in:
app/controllers/capcoauth/logout_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#capcoauth_token, #oauth_callback_url

Instance Method Details

#showObject



3
4
5
6
7
8
# File 'app/controllers/capcoauth/logout_controller.rb', line 3

def show
  session.delete(:capcoauth_user_id)
  token = session.delete(:capcoauth_access_token)
  OAuth::TTLCache.remove(token) if token.present?
  redirect_to root_url, notice: 'You have been logged out'
end