-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
"Unpermitted parameter: session" issues when action_controller.action_on_unpermitted_parameters is :raise #676
Comments
Rails can transform parameters depending on the request format. This is done by, and can be configured with ParamsWrapper In my config/initializers/wrap_parameters I changed
I think this is not an devise_token_auth issue. But since devise token auth does not expect the wrapping, maybe it would help people from running into this by setting it explicitly by adding something like (not tested)
|
@KjellMorgenstern I like this workaround. Thanks |
I believe this can be closed. This is one final solution:
Result:
|
Closed |
not solved for me with wrap_parameters format: [:json] |
thanks stephanebruckert, It works |
thanks @stephanebruckert 🙏 👌 |
Hello,
Just started using devise_token_auth. Thank you for creating it.
The issue I ran into was that with a vanilla rails (4.2.6) app with:
The app would crash if the environment file had action pack configured to raise an exception due to unpermitted params:
The log in this case shows:
When action_on_unpermitted_params setting was ommitted, everything works and I see:
Haven't had a chance to offer a solution yet. 8-)
The text was updated successfully, but these errors were encountered: