Skip to content

Create User.reset_password_changeset/2 #728

@begedin

Description

@begedin

Problem

We need to define reset_password_changeset(struct, params) on User

  • casts :password and :password_confirmation
  • validates that the two are equal
  • if valid, encrypts the password and puts it as :encrypted_password into the changeset
  • if invalid, should add an error
  • we can make use of User.put_pass_hash to achieve parts of this
  • we probably need to add a virtual :password_confirmation field to the user schema

References

Progress on: #498

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions