On 1.8+, when we generate an authentication system with mix phx.gen.auth we can make use of magic link login which is amazing and a great addition to the ecosystem. On the projects I’ve been testing out 1.8, after I do the mix phx.gen.auth I always remove all password related code as I personally prefer to have a complete password-less system. What if mix phx.gen.auth accepted an option --only-pwless or something similar that would ditch out the password related code right from the generation?
We could do that, but with the current generators every option we add needs to be carefully maintained, therefore it is a delicate balance.
The Phoenix generators support reading files from your own priv directory instead, so you could overwrite the original ones and reuse your modifications across projects by copying over the files from priv before running mix phx.gen.auth. So that is what I would recommend for now.
Thank you for the feedback!
This is so powerful that sometimes I think whether it is easy enough to discover it’s an option.
I think I first learned about this in a blog post, then some threads in this forum.
Talks about the mix tasks, but I didn’t find a mention to overriding the templates. Shall we add a section about customizing the templates?
Is there something official elsewhere?






















