Skip to content

Users & Authentication

core

Registration, login, magic links, OAuth, roles and per-role permissions

Included in core

The 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

From the README
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.

New app
$ mix igniter.install phoenix_kit
Releases
  1. 3.4.0
  2. 3.3.0
  3. 3.0.0
Admin
/admin/users

Related modules

What it needs, what builds on it, and its neighbours in Core.