Phoenix 1.8 introduces Scopes as a structured container for request context (current user, tenant, permissions) that gets passed into domain/context functions to enforce data boundaries. The post explains how mix phx.gen.auth generates a default scope struct, wires it into the browser pipeline via a plug, and provides a

9m read timeFrom curiosum.com
Post cover image
Table of contents
What are Phoenix Scopes?Authentication vs scoping vs authorizationScopes generated by mix phx.gen.authScopes are not a complete authorisation systemHow Permit.Phoenix works with Phoenix ScopesWhy use Permit.Phoenix instead of only raw scopes?Choosing the Right Layer

Sort: