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
Hi everyone, sorry if I'm doing something bad, but I can't work with devise_token_auth and subdomain.
I have this: constraints subdomain: 'api' do mount_devise_token_auth_for 'Account', at: 'user_auth' (...) end
And routes seems correctly:
new_account_session GET /user_auth/sign_in(.:format) devise_token_auth/sessions#new {:subdomain=>"api"}
The error is: Unpermitted parameter: subdomain x3 times on a simple curl request:
I overridden the RegistrationController for method sign_in_params, to allow the .permit(:email, :password).
Without this overriding, I get a lot of errors on Unpermitted parameters again with subdomain.
If I remove the constraints subdomain: "api", I never get the error, but still there's 422: Unprocessable Entity for Processing by Overrides::RegistrationsController#create as */*
(VERY STRANGE as */* even if I put default: {format: 'json'} ), it returns also Unpermitted parameter: format. I don't know where I'm going wrong or how to solve.
Why doesn't work with subdomain?
Why is it unable to process entity?
The text was updated successfully, but these errors were encountered:
Your problem comes from the error message "errors":["Missing 'confirm_success_url' parameter."].
You must send a confirm_success_url param with the data of your request so Devise Token Auth knows where to redirect users after successful email confirmation.
Hi everyone, sorry if I'm doing something bad, but I can't work with devise_token_auth and subdomain.
I have this:
constraints subdomain: 'api' do
mount_devise_token_auth_for 'Account', at: 'user_auth'
(...)
end
And routes seems correctly:
new_account_session GET /user_auth/sign_in(.:format) devise_token_auth/sessions#new {:subdomain=>"api"}
The error is:
Unpermitted parameter: subdomain
x3 times on a simple curl request:curl -i -H "Content-Type: application/json" -d '{ "email": "[email protected]", "password": "***", "password_confirmation":"***" }' -X POST http://api.test.com:3000/user_auth/
Body Repsonse:
{"status":"error","data":{"id":null,"provider":"email","uid":"","email":"[email protected]","number":null,"user_id":null,"created_at":null,"updated_at":null},"errors":["Missing 'confirm_success_url' parameter."]}
Server Log:
Started POST "/user_auth/" for 127.0.0.1 at 2017-02-13 22:08:22 +0100
Processing by Overrides::RegistrationsController#create as */*
Parameters: {"email"=>"[email protected]", "password"=>"[FILTERED]", password_confirmation"=>"[FILTERED]", "subdomain"=>"api"}
Unpermitted parameter: subdomain
Unpermitted parameter: subdomain
Unpermitted parameter: subdomain
Completed 422 Unprocessable Entity in 134ms (Views: 0.2ms | ActiveRecord: 0.0ms)
I overridden the
RegistrationController
for methodsign_in_params
, to allow the.permit(:email, :password)
.Without this overriding, I get a lot of errors on
Unpermitted parameters
again withsubdomain
.If I remove the
constraints subdomain: "api"
, I never get the error, but still there's422: Unprocessable Entity
forProcessing by Overrides::RegistrationsController#create as */*
(VERY STRANGE
as */*
even if I putdefault: {format: 'json'}
), it returns alsoUnpermitted parameter: format
. I don't know where I'm going wrong or how to solve.Why doesn't work with subdomain?
Why is it unable to process entity?
The text was updated successfully, but these errors were encountered: