phoenix-liveview-auth
Installation
SKILL.md
Phoenix LiveView Authentication
Use this skill before writing ANY on_mount hook or LiveView auth code.
Requires
phoenix-scopesfor Scope struct setup. Seephoenix-authorization-patternsfor access control after authentication, andphoenix-liveview-essentialsbefore writing any LiveView module.
RULES
- Use
on_mountcallbacks — never check auth inmount/3directly; usemount_current_scope/2to extract scope, never access session tokens manually :haltmust redirect with a flash message — never silently drop the connection- Define
on_mounthooks once, reference vialive_sessionin router — never duplicate auth logic across LiveView modules