Pow: Robust, modular, extendable user authentication and management system

Pow doesn’t offer this out of the box, but it would be trivial to build.

For admin invite, I would set up a custom registration controller that calls the actions in Pow.Phoenix.RegistrationController. The controller will have a plug action that verifies that the invite token is valid. The token is invalidated upon successful registration. As an extension, it would look pretty similar to the PowResetPassword extension.

For admin approval, I would use a controller callback for the Pow registration and session controller. It’ll just halt the connection if the user hasn’t been approved, and redirect users to the sign in page with a flash message. It’ll be very similar to the existing PowEmailConfirmation extension.

Both of these would be easy to set up as Pow extensions too.

4 Likes