None of the current solutions worked well for me, so I went ahead and built a user management system from scratch.
This project took far longer than I initially thought, and I would love to get some help to iron out everything. So please try it out and let me know what you think!
The latest release is a pre release version, but it is running in a production environment (we went away from a Coherence setup).
So what does Pow do (differently)?
A huge issue with most libraries is the dependency on a global environment configuration. It becomes especially messy when dealing with umbrella apps. Pow handles configuration by passing it as an argument to all method calls (and with plug it’s passed in a private key). There’s also fallback to app-specific environment configuration by using
:otp_app like Ecto/Phoenix.
Plug n’ play
Pow exposes only necessary files. It means that even views and templates for Phoenix aren’t generated unless required for customization.
Pow has been build with clear separation between Ecto, Plug, and Phoenix modules, so if/when deep customization is necessary, you can pull out any part and work with it.
Out of the box, Pow does basic user and session management. But Pow has been made to be easy to extend. A reset password, email confirmation and remember me extension ships with it! Extensions are built as a separate system to keep the core of Pow lean and easy to understand.
When working with user authentication, there can be many pitfalls. That’s why your user authentication library should do as much of the work as possible, so you don’t have to think about it. Pow is built with care for recommended best practice, and detailed in the readme.
Pow attempts to give the developer full control and understanding of the API for Pow. For example, when you install pow, you’ll have to enable extension support yourself, so you understand the working parts. This it to remove as much “magic” as possible.
And a whole lot more
- Mnesia cache for distributed systems (and in general for production run)
- Near zero dependencies (
:phoenix_htmlare currently required to compile, but I plan to make them optional)
- Simple migration from Coherence
- Multi provider support with https://github.com/danschultzer/pow_assent
- Alright! Go read the documentation already: https://hexdocs.pm/pow/