-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot update params when use warden.authenticate in devise #131
Comments
Here is my part of code and logs:
proxy.rb
logs: It seems there are two params, one is in controller, one is in warden. |
Warden strategies under devise reference the cached instance of the action dispatch request. I'm not sure why params wouldn't be there. AFAIK they're the same instance however it has been a while since I've looked at the behaviour of ActionDispatch::Request |
I had the same problem. In case anyone is looking here for the answer, the problem is that Warden fetches the user from request.params, which can differ from the params available in the controller. Once you have updated params[:user], the simple solution is usually as follows:
Found in heartcombo/devise#4309 |
Hi,
I have upgrade my rails from 3.2.8 to rails 4, also devise is upgrade from 2.1.2 to 3.5.6 and warden from 1.2.3 to 1.2.6.
I found an issue that I don't know what it should belongs to devise or warden.
Before I call
resource = warden.authenticate(:scope => resource_name, :recall => "#{controller_path}#new")
I update params value like below:
params[:admin] = Hash.new params[:admin][:email] = params[:email] params[:admin][:password] = params[:password]
But when I print params in proxy.rb, the function def authenticate(*args)
the params is still the original, there are no any admin in it.
The issue is not happened when I use the old system.
And because of this issue, I cannot authenticate admin successfully.
Is there any configuration or any other things I missed?
Hope ur answers,
Thank u.
The text was updated successfully, but these errors were encountered: