Generates the authentication stack from a Caravela domain whose
authenticatable entity declares an authenticatable block.
mix caravela.gen.auth MyApp.Domains.IdentityEmits:
- the auth context module (register, login, logout, sessions, API tokens, reset, confirm)
- the session schema module
- the Plug pipeline (fetch_current_user, require_auth, require_role, require_scope)
- the LiveView
on_mounthooks module - the auth controller (register / login / logout)
- a migration creating the session tokens table
Flags:
--dry-run— print the generated files without writing anything--output DIR— write underDIRinstead of the project root--force— overwrite existing files without prompting