Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mix tasks #699

Open
danschultzer opened this issue May 2, 2023 · 0 comments
Open

Improve mix tasks #699

danschultzer opened this issue May 2, 2023 · 0 comments

Comments

@danschultzer
Copy link
Collaborator

danschultzer commented May 2, 2023

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.install prompts what user id to use (email 1, username 2, manual user id input 3)
  • Pow.Install prompts if any built-in extensions should be enabled
  • Pow.Extension.Gen.Mailer to generate mailer module
  • Pow.Ecto.Gen.Context to generate customizable context module
    • Prompt user on Pow.Ecto.Install if they want a context file?
  • Pow.Phoenix.Install prompts what session store to use (Mnesia 1, ETS 2, Redis 3, maybe add ecto store as another option?)
  • Pow.Phoenix.Install prompts if routes by default should be protected and require sign in
  • Pow.Ecto.Install generate fixtures (if something like that already exists) and Pow.Phoenix.Install maybe adds test cases to ensure proper plug integration
  • Pow.Ecto.Install automatically 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.Install to install for liveview integration (requires introducing message passing to the cache so users can be forced logged out)
  • Pow.Ecto.Install prompts what password hashing mechanism should be used (PBKDF2, Argon2, etc)
  • Pow.Install guesses 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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant