can't be blank
MattGaud2425 opened this issue · 5 comments
Processing with Coherence.RegistrationController.create/2
Parameters: %{"_csrf_token" => "Iho9FAlTES1jCwsZXVpyVxReRS4GAAAAFIUW15pN5FhvnbD5y13g7Q==", "_utf8" => "✓", "registration" => %{"email" => "quickhat22@Gmail.com", "name" => "quickhat22", "password" => "[FILTERED]", "password_confirmation" => "[FILTERED]"}}
registration processed but rendered error with can't be blank alerts above the email, password and password confirmation fields.
I am having same problem. New version 0.5.1 kind of has breaking changes thats not documented anywhere. For ex. whats registration_permitted_attributes
, in registration controller 'Controller.changeset
always return empty struct.
I had the same problem after upgrading. I got this fixed by adding:
registration_permitted_attributes: ["email","name","password","current_password","password_confirmation"]
to the config.exs of Coherence. I.e. full config is
config :coherence,
user_schema: Test.Coherence.User,
repo: Test.Repo,
module: Test,
web_module: TestWeb,
router: TestWeb.Router,
messages_backend: TestWeb.Coherence.Messages,
logged_out_url: "/",
user_active_field: true,
email_from_name: "Test",
email_from_email: "hello@test.net",
opts: [:authenticatable, :recoverable, :trackable, :registerable, :confirmable, :rememberable] ,
registration_permitted_attributes: ["email","name","password","current_password","password_confirmation"]
I'm sorry for the inconvenience. Yes, 0.5.1 introduced the permitted_attributes feature, requiring this configuration. This is a huge security improvement. I'm thinking of adding defaults so upgraded applications without the config will have a sensible default.
@smpallen99 make sense! I think just mentioning in the doc (the new setting) should suffice for now. And btw - thanks a lot for running this project 👍
@smpallen99 Also please consider adding changeling, even one liner would be enough. Anyways great job with this library.