Skip to content
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

redirect_url required but not permitted in strong parameters #805

Closed
Rush opened this issue Jan 11, 2017 · 0 comments
Closed

redirect_url required but not permitted in strong parameters #805

Rush opened this issue Jan 11, 2017 · 0 comments

Comments

@Rush
Copy link
Contributor

Rush commented Jan 11, 2017

I am trying to implement the password reset flow as described here: https://github.com/lynndylanhurley/devise_token_auth/wiki/Reset-Password-Flow

The offending piece of code is here:
https://github.com/lynndylanhurley/devise_token_auth/blob/master/app/controllers/devise_token_auth/passwords_controller.rb#L226

As the flow requires to send redirect_url as part of the reset password request, it always fails with:

ActionController::UnpermittedParameters: found unpermitted parameter: redirect_url
    /home/rush/.rvm/gems/ruby-2.3.3@global/gems/actionpack-5.0.1/lib/action_controller/metal/strong_parameters.rb:734:in `unpermitted_parameters!'
    /home/rush/.rvm/gems/ruby-2.3.3@global/gems/actionpack-5.0.1/lib/action_controller/metal/strong_parameters.rb:398:in `permit'
    /home/rush/.rvm/gems/ruby-2.3.3/gems/devise_token_auth-0.1.39/app/controllers/devise_token_auth/passwords_controller.rb:226:in `resource_params'
    /home/rush/.rvm/gems/ruby-2.3.3/gems/devise_token_auth-0.1.39/app/controllers/devise_token_auth/passwords_controller.rb:9:in `create'
    /home/rush/.rvm/gems/ruby-2.3.3@global/gems/actionpack-5.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'

Any tips on a non-hacky solution?

Rush added a commit to virtkick/devise_token_auth that referenced this issue Jan 11, 2017
booleanbetrayal added a commit that referenced this issue Jan 19, 2017
Add missing parameter :redirect_url, fixes #805
bartes pushed a commit to bartes/devise_token_auth that referenced this issue Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant