Skip to content

Improve mix tasks #699

@danschultzer

Description

@danschultzer

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 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions