We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using devise_token_auth and ng-token-auth
devise_token_auth
ng-token-auth
Error:
Started POST "/auth" for ::1 at 2016-01-19 15:04:04 -0300 Processing by DeviseTokenAuth::RegistrationsController#create as HTML Parameters: {"password"=>"[FILTERED]", "cpf"=>"xxxxxxxxx", "confirm_success_url"=>"http://172.16.0.234:8100/#/sign-up", "config_name"=>"default", "registration"=>{"password"=>"[FILTERED]", "cpf"=>"xxxxxxxxx", "confirm_success_url"=>"http://172.16.0.234:8100/#/sign-up", "config_name"=>"default"}} Can't verify CSRF token authenticity Unpermitted parameters: confirm_success_url, config_name, registration Unpermitted parameters: confirm_success_url, config_name, registration Unpermitted parameters: confirm_success_url, config_name, registration (0.3ms) BEGIN (0.7ms) SELECT COUNT(*) FROM "clientes" WHERE "clientes"."provider" = $1 AND "clientes"."email" IS NULL [["provider", "email"]] (0.3ms) ROLLBACK Completed 403 Forbidden in 112ms (Views: 0.6ms | ActiveRecord: 5.2ms)
My ApplicationController
... before_action :configure_permitted_parameters, if: :devise_controller? protected def configure_permitted_parameters devise_parameter_sanitizer.for(:sign_up) << [:name, :cpf ] end ...
my angular controller
function signUp( cliente ) { $auth.submitRegistration({ email: cliente.email, password: cliente.password, password_confirmation: cliente.passwordConfirmation, name: cliente.name, cpf: cliente.cpf, }).then( signUpSucess ).catch( signUpError ); };
my form
<form ng-submit="signUp(cliente)" role="form" ng-init="cliente = {}"> <div class="list"> <label class="item item-input item-floating-label"> <span class="input-label">Email</span> <input type="email" name="email" placeholder="Email" ng-model="cliente.model" required="required"> </label> <label class="item item-input item-floating-label"> <span class="input-label">CPF</span> <input type="text" name="cpf" placeholder="CPF" ng-model="cliente.cpf" required="required"> </label> <label class="item item-input item-floating-label"> <span class="input-label">Nome</span> <input type="text" name="nome" placeholder="Nome" ng-model="cliente.nome" required="required"> </label> <label class="item item-input item-floating-label"> <span class="input-label">Senha</span> <input type="password" name="password" placeholder="Senha" ng-model="cliente.password" required="required"> </label> <label class="item item-input item-floating-label"> <span class="input-label">Confirmação de Senha</span> <input type="password" name="password_confirmation" placeholder="Confirmação de Senha" ng-model="cliente.password_confirmation" required="required"> </label> </div> <button class="button button-block button-positive activated">Cadastrar-se</button> </form>
When I add confirm_success_url, config_name, registration to permitted params, I got this error:
confirm_success_url
config_name
registration
ActiveRecord::UnknownAttributeError (unknown attribute 'confirm_success_url' for Cliente.):
I'm using: devise_token_auth (0.1.36) ng-token-auth (0.0.28)
devise_token_auth (0.1.36)
ng-token-auth (0.0.28)
The text was updated successfully, but these errors were encountered:
I find my error: ng-model="cliente.model" is supposed to be ng-model="cliente.email"
ng-model="cliente.model"
ng-model="cliente.email"
Sorry
Sorry, something went wrong.
No branches or pull requests
I'm using
devise_token_auth
andng-token-auth
Error:
My ApplicationController
my angular controller
my form
When I add
confirm_success_url
,config_name
,registration
to permitted params, I got this error:I'm using:
devise_token_auth (0.1.36)
ng-token-auth (0.0.28)
The text was updated successfully, but these errors were encountered: