PhxAuthPlus (phx_auth_plus v0.3.2)
View SourcePhxAuthPlus - Complete authentication generator for Phoenix 1.8+.
Aligned with the Phoenix 1.8.9 phx.gen.auth templates. Provides email +
password login, magic link login, registration, password reset, account
confirmation, settings, and scope-based auth.
Quick Start
Add phx_auth_plus to your dependencies:
def deps do
[
{:phx_auth_plus, "~> 0.2", only: [:dev, :test]}
]
endThen generate authentication:
mix phx_auth_plus.gen.auth Accounts User usersFeatures
- Email + password authentication
- Magic link login (passwordless)
- LiveView and Controller support (
--live/--no-live) - Multiple hashing libraries (bcrypt, pbkdf2, argon2)
- Account confirmation by email
- Password reset flow
- Settings page (change email, change password)
- "Remember me" with secure cookies
- Session tracking and invalidation
- Scope-based auth (
current_scope) - Dynamic layout menu (login/register, email/settings/logout)
- Built with Igniter for smart code generation
Options
mix phx_auth_plus.gen.auth Accounts User users \
--hashing-lib pbkdf2 \
--no-live \
--binary-idSee mix help phx_auth_plus.gen.auth for all options.
Summary
Functions
Returns the default hashing library for the current OS.
Returns the supported hashing libraries.