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
Started POST "/auth/sign_in" for ::1 at 2019-11-23 13:39:29 -0800
Processing by DeviseTokenAuth::SessionsController#create as */*
Parameters: {"email"=>"[email protected]", "password"=>"[FILTERED]", "foo_bar"=>"FOO_TEST", "session"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "foo_bar"=>"FOO_TEST"}}
Unpermitted parameter: :session
Unpermitted parameter: :session
User Load (1.8ms) SELECT "users".* FROM "users" WHERE "users"."email" = $1 AND "users"."provider" = $2 LIMIT $3 [["email", "[email protected]"], ["provider", "email"], ["LIMIT", 1]]
Unpermitted parameter: :session
Unpermitted parameter: :session
(0.3ms) BEGIN
User Update ... (removed for brevity because its not relevant)
(0.5ms) COMMIT
User Load ...
(0.2ms) BEGIN
User Load ...
User Update ...
(1.9ms) COMMIT
Completed 200 OK in 538ms (Views: 0.3ms | ActiveRecord: 10.2ms | Allocations: 12814)
classApplicationController < ActionController::APIincludeDeviseTokenAuth::Concerns::SetUserByTokenbefore_action:configure_permitted_parameters,if: :devise_controller?protecteddefconfigure_permitted_parameters# I originally was seeing this problem with registering users.# I get the same problem as signing in a user except I get# "registration" instead of "session".devise_parameter_sanitizer.permit(:sign_up,keys: [:name])# :foo_bar was a sanity check to see what was causing this problem.# Signing in a user creates an extra "session" parameter hash.# (see the logs).devise_parameter_sanitizer.permit(:sign_in,keys: [:foo_bar])endend
Custom Frontend: Using a vanilla javascript fetch method:
If you look at the log, you'll see that my payload is sent the form data correctly but I think DTA is adding another set of my parameters under "session". I'm getting the same issue when I go to register a user but the parameters are under "registration". I'm probably doing something wrong here (maybe in the application_controller.rb?), so any help would be much appreciated.
The text was updated successfully, but these errors were encountered:
When posting issues, please include the following information to speed up the troubleshooting process:
Version: 1.1.3
I'm using a javascript fetch method to accomplish this (see code below)
Request and response headers:
Response Headers:
Request Headers:
Request Payload (it's relevant I think):
mount_devise_token_auth_for 'User', at: 'auth'
Other than the default gems, this is what's being used:
application_controller.rb:
Using a vanilla javascript fetch method:
If you look at the log, you'll see that my payload is sent the form data correctly but I think DTA is adding another set of my parameters under
"session"
. I'm getting the same issue when I go to register a user but the parameters are under"registration"
. I'm probably doing something wrong here (maybe in theapplication_controller.rb
?), so any help would be much appreciated.The text was updated successfully, but these errors were encountered: