phoenix-auth-customization
Installation
SKILL.md
Phoenix Auth Customization
Use this skill when extending phx.gen.auth with custom fields.
RULES — Follow these with no exceptions
- Never modify generated auth migrations — create separate migrations for custom fields
- Update
registration_changesetto cast and validate new fields — don't create a separate changeset - Update test fixtures when adding required fields — missing fixture fields cause cryptic test failures
- Confirm users in test fixtures for password-based auth — set
confirmed_ator tests will fail - Update both the registration form AND the
save/2handler — the form must send the field - Use
unique_constraint+ database unique index for uniqueness — never validate in application code alone