phoenix-liveview-auth

Installation
SKILL.md

Phoenix LiveView Authentication

Use this skill before writing ANY on_mount hook or LiveView auth code.

Requires phoenix-scopes for Scope struct setup. See phoenix-authorization-patterns for access control after authentication, and phoenix-liveview-essentials before writing any LiveView module.

RULES

  1. Use on_mount callbacks — never check auth in mount/3 directly; use mount_current_scope/2 to extract scope, never access session tokens manually
  2. :halt must redirect with a flash message — never silently drop the connection
  3. Define on_mount hooks once, reference via live_session in router — never duplicate auth logic across LiveView modules

Implementation Workflow

Installs
3
First Seen
3 days ago
phoenix-liveview-auth — igmarin/elixir-phoenix-skills