You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But as I am trying integrating OmniAuth into a Rails API, I stumbled upon their section when they advise to add in application.rb:
config.session_store:cookie_store,key: '_interslice_session'config.middleware.useActionDispatch::Cookies# Required for all session managementconfig.middleware.useActionDispatch::Session::CookieStore,config.session_options
This seems to be causing the sign_in method to fail with this error message:
undefined method `[]=' for nil:NilClass
Commenting config lines makes it work again...
Expected behavior
Ability to sign in user
The text was updated successfully, but these errors were encountered:
The wiki is maintained by the community. So if there aren't any up to date instructions, we recommend you to explore the solution yourself and hopefully contribute your findings back.
You shouldn't need to define the sign_in method, using the Devise::Test::IntegrationHelpers module should be enough.
I'm going to close this issue since we reserve the issue tracker for problems in the library only. If you still need help, please open a question on Stack Overflow. You can even send it to me here and I'll try to help.
Hi @tegon, thank you for your answer.
I found a solution to my problem thanks to @mrstif in this issue. By the way, I noticed that you already exchanged with him on the matter...
Here is his answer for the record:
Apparently, in rails-api mode, the ActionDispatch::Cookies and ActionDispatch::Session::CookieStore middlewares are inserted in the end of the middleware stack, which doesn't occur in normal Rails mode.
Due to this, those middlewares are included after Warden::Manager which messes up something in request specs...
Environment
Current behavior
Il followed proposed tuto to sign in and out a user in Request type specs and it worked fine. It introduces this sign_in method:
But as I am trying integrating OmniAuth into a Rails API, I stumbled upon their section when they advise to add in application.rb:
This seems to be causing the sign_in method to fail with this error message:
Commenting config lines makes it work again...
Expected behavior
Ability to sign in user
The text was updated successfully, but these errors were encountered: