mix star_view.setup.auth (star_view v0.7.0)

Copy Markdown View Source

Generates StarView magic-link auth pages for AshAuthentication

Generates a StarView-powered sign-in page and magic-link landing page, wires them into the Phoenix router, and replaces the default AshAuthentication sign-in routes (sign_in_route/magic_sign_in_route) with the generated pages.

Example

mix star_view.setup.auth

What it does

  • Generates MyAppWeb.AuthController — the /auth/sign-in page with a magic-link email form.
  • Generates MyAppWeb.Auth.MagicSignIn — the /magic_link/:token landing page that exchanges the token via a real form POST.
  • Adds the auth routes to the router and removes sign_in_route / magic_sign_in_route if present.
  • Ensures the generated StarView layout module has a Layout.auth/1 layout.