pow
pow copied to clipboard
Improve mix tasks
I would like to improve the mix tasks and make it much faster and simpler to set up up, and customize Pow. Ideally the general install mix task will prompt the user for customization options (unless flag is passed to supress them), and can handle partial Pow installations and automated migrations from other auth systems.
Here's some of the things I would like the improved mix tasks to do:
Pow.Ecto.installprompts what user id to use (email 1, username 2, manual user id input 3)Pow.Installprompts if any built-in extensions should be enabledPow.Extension.Gen.Mailerto generate mailer modulePow.Ecto.Gen.Contextto generate customizable context module- Prompt user on
Pow.Ecto.Installif they want a context file?
- Prompt user on
Pow.Phoenix.Installprompts what session store to use (Mnesia 1, ETS 2, Redis 3, maybe add ecto store as another option?)Pow.Phoenix.Installprompts if routes by default should be protected and require sign inPow.Ecto.Installgenerate fixtures (if something like that already exists) andPow.Phoenix.Installmaybe adds test cases to ensure proper plug integrationPow.Ecto.Installautomatically deals with migrations by detecting existing user migration, context, and schema files and prompt end-user what to do- Might require some more advanced diff handling?
Pow.Phoenix.Live.Installto install for liveview integration (requires introducing message passing to the cache so users can be forced logged out)Pow.Ecto.Installprompts what password hashing mechanism should be used (PBKDF2, Argon2, etc)Pow.Installguesses and prompts which app is the phoenix app in umbrella projects- Context settings should help install in context app
- Should check that pow exists in context app deps
Most of these can be done individually so if anyone wants to help contribute please feel free! Also any ideas for how to make it more ergonomic is appreciated 😄