Is there an easier way of method for adding new fields to phx.gen.auth?

Hello everyone. Is there an easier way of method for adding new fields to phx.gen.auth? I have added a new field, and it is quite challenging as it requires me to update a significant amount of existing code just for the addition of a single field.

1 Like

Depends on how you are doing it already?

If you are adding something like a username during registration there’s not that much you need to do.

update the repo migration table
update the schema to match
update the existing registration_changeset
update the existing registration form with a new input field

should only get complicated if you add a bunch of validation steps for your new fields or want to split the code up to have seperate changesets

2 Likes