phoenix-auth-customization
Installation
SKILL.md
Phoenix Auth Customization
RULES — Follow these with no exceptions
- Never modify generated auth migrations — create separate migrations for custom fields; generated migrations are tested and correct
- Update
registration_changesetto cast and validate new fields — don't create a separate changeset for initial registration - Update test fixtures when adding required fields — missing fixture fields cause cryptic test failures across the entire test suite
- Confirm users in test fixtures for password-based auth — set
confirmed_at: DateTime.utc_now(:second)or tests requiring authenticated users will fail - Update both the registration form AND the
save/2handler — the form must send the field, and the handler must pass it to the context - Use
unique_constraint+ database unique index for uniqueness — never validate uniqueness in application code alone
Running phx.gen.auth
Start with the generator, then extend. Never hand-roll auth.
# Generate auth with LiveView (recommended)
Related skills
More from j-morgan6/elixir-phoenix-guide
oban-essentials
MANDATORY for ALL Oban work. Invoke before writing workers or enqueuing jobs.
1phoenix-json-api
MANDATORY for ALL JSON API work. Invoke before writing API controllers, pipelines, or JSON responses.
1ecto-essentials
MANDATORY for ALL database work. Invoke before modifying schemas, queries, or migrations.
1otp-essentials
MANDATORY for ALL OTP work. Invoke before writing GenServer, Supervisor, Task, or Agent modules.
1code-quality
Automated code quality detection — duplication, complexity, unused functions. Invoke when analyzing or refactoring Elixir code.
1phoenix-uploads
MANDATORY for file upload features. Invoke before implementing upload or file serving functionality.
1