Routes for the login page and sign-in, added to a Phoenix router with
import HaAuth.Router
# at the top level of the router, not inside a scope:
ha_auth_routes()Options:
:pipe_through- the app's browser pipelines (default[:browser]); they need:fetch_session, flash and CSRF protection:root_layout- root layout for the login and phone pages, e.g.{MyAppWeb.Layouts, :root}(default: whatever the pipelines set). It must load the app'sapp.jsso the login page's LiveView connects.
Adds GET /login, /auth/ha, /auth/callback, /auth/kiosk,
/auth/pair/finish, GET/POST /pair/:code and DELETE /logout.