Class: AuthRocket::ArController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/auth_rocket/ar_controller.rb

Direct Known Subclasses

LoginsController

Instance Method Summary collapse

Instance Method Details

#logoutObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/auth_rocket/ar_controller.rb', line 9

def logout
  if AuthRocket::Api.post_logout_path
    uri = Addressable::URI.parse full_url_for
    uri.path = AuthRocket::Api.post_logout_path
    redirect_to ar_logout_url(redirect_uri: uri.to_s), allow_other_host: true
  else
    redirect_to ar_logout_url, allow_other_host: true
  end
  # set flash message in the child

  session[:ar_token] = nil
end