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

Missing 'confirm_success_url' parameter. when registering user from backend devise_token_auth #24

Open
DonGiulio opened this issue Feb 9, 2018 · 2 comments

Comments

@DonGiulio
Copy link

DonGiulio commented Feb 9, 2018

I'm getting this error when registering a new user,

here's my signUp function:

const signUp = (data, dispatch, props) => {
  data["confirm_success_url"] = props.match.url.replace("/signup", "");
  data["uid"] = data.email;
  dispatch(registerUser(data));
};

as called <form onSubmit={props.handleSubmit(signUp)}>

and these are the parameters received by my devise_token_auth action:

<ActionController::Parameters {"email"=>"[email protected]", "password"=>"pwd", "password_confirmation"=>"pwd", "controller"=>"auth/registrations", "action"=>"create", "registration"=>{"email"=>"[email protected]", "password"=>"pwd", "password_confirmation"=>"pwd"}} permitted: false>

no traces of any of the extra data fields I added: confirm_success_url, uid.

They seem to be required by devise_token_auth

Is it possible I'm doing something wrong there?

thanks,
Giulio

@peterlawless
Copy link

Hey @DonGiulio I don't see the details of your error and you have likely moved on by now but two things you might attempt:

  1. attempt setting default_confirm_success_url in the config/initializers/devise_token_auth.rb file on your rails app (see more initializer options here)
  2. This issue brought to my attention that the mailer views generated by devise_token_auth are a little different than those generated by classic devise, so you may want to run rails generate devise_token_auth:install_views so that the link in your confirmation email works with your confirmation success url.

@maysam
Copy link

maysam commented Jun 24, 2021

do you have include DeviseTokenAuth::Concerns::User inserted in your user model?

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

3 participants