jeudi 28 octobre 2021

How to delete the domain and subdomain from session using devise

I am using rails device. I am trying to delete all domain and subdomain from session when the user logout but in my case after session.clear when i check the session still it shows the domain and subdomain name. is there any way i can delete domain and subdomain from the session after log out and destroy all sessions

session_store.rb

Rails.application.config.session_store :cookie_store, key: '_app_session'

session_controller.rb

def destroy
  signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
  cookies.delete(:impersonate)
  cookies.delete("auth_token")
  session.clear
  respond_to_on_destroy

end

Aucun commentaire:

Enregistrer un commentaire