Reputation: 19
I am trying to use devise without it trying to write to the session store because I am using devise_jwt but no matter how I turn off sessions I keep getting this error:
ActionDispatch::Request::Session::DisabledSessionError - Your application has sessions disabled. To write to the session you must first configure a session store:
Inside /config/initializers/devise.rb
I have tried this:
config.skip_session_storage = %i[http_auth params_auth]
But that does not stop the issue. In the config/environments/development.rb
I have also tried to use this code:
config.session_store = :null_store
And in config/application.rb
I have tried this:
config.session_store :disabled
All of which have not worked
Upvotes: 0
Views: 229
Reputation: 1095
There's a few forums on this. Try updating the config like so. There's several Devise modules you may still be using that rely on cookies/sessions.
config.session_store :cookie_store, key: '_interslice_session'
config.middleware.use ActionDispatch::Cookies
config.middleware.use config.session_store, config.session_options
Upvotes: 0