Users & Authentication
coreRegistration, login, magic links, OAuth, roles and per-role permissions
Included in coreThe user module that ships with phoenix_kit: registration, login, password reset, magic link sign-in and email confirmation, with OAuth via Google, GitHub and Facebook. Users carry roles (Owner, Admin, User plus custom roles), custom fields in JSONB, locale, timezone and registration location, and a permission matrix decides which roles reach which admin sections and modules.
Use it when
- You need sign-up, login and password reset in a Phoenix app without writing them yourself
- You need custom roles with granular per-module access to an admin area
What it gives you
- Registration, login, logout, password reset and magic link sign-in
- Email confirmation enforced at every auth entry point and rate limiting on public auth endpoints
- OAuth sign-in with Google, GitHub and Facebook
- New-login security alerts for unrecognized devices or IPs
- System roles (Owner, Admin, User), custom roles and a permission matrix at /admin/users/permissions
- Custom user fields (JSONB), user timezone and locale, registration location
- Multi-session support, session management and admin "log in as user" impersonation
Example
Permissions.grant_permission(role_uuid, "billing", granted_by_uuid)
Scope.has_module_access?(scope, "billing")
Users & Authentication news
Nothing posted about Users & Authentication yet. Read its changelog or see all PhoenixKit news.
Install
Included in phoenix_kit. Nothing extra to install.
$ mix igniter.install phoenix_kit
- Releases
-
- 3.4.0
- 3.3.0
- 3.0.0
- Admin
-
/admin/users - Links
- HexDocs ↗ GitHub ↗ Changelog ↗
Related modules
What it needs, what builds on it, and its neighbours in Core.
Admin Panel
Admin dashboard with modules manager, activity feed, audit log, notifications
Included in phoenix_kit
Email Delivery
Outgoing email through any Swoosh adapter, with named send profiles
Included in phoenix_kit
Languages
Backend and frontend languages, locale-prefixed URLs, one on/off switch
Included in phoenix_kit
Maintenance Mode
Close the site to visitors while admins keep working
Included in phoenix_kit
Media & Storage
File storage on local disk or S3-compatible buckets, with image/video resizing
Included in phoenix_kit
Sitemap & Crawlers
XML/HTML sitemaps, robots.txt, llms.txt and bot-access policy
Included in phoenix_kit