ash_authentication_phoenix/dev/dev_web/router.ex
James Harton 432f056905
feat(PasswordReset): Add a generic password reset form (#37)
* feat(PasswordReset): Add a generic password reset form

* improvement(Input.submit): trim trailing "with password" from submit buttons.
2022-12-15 16:31:52 +13:00

39 lines
956 B
Elixir

defmodule DevWeb.Router do
@moduledoc false
use DevWeb, :router
use AshAuthentication.Phoenix.Router, otp_app: :ash_authentication_phoenix
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {DevWeb.LayoutView, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
plug :load_from_session
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", DevWeb do
pipe_through(:browser)
get "/", PageController, :index
end
# Other scopes may use custom stacks.
# scope "/api", DevWeb do
# pipe_through :api
# end
scope "/", DevWeb do
pipe_through :browser
auth_routes_for(Example.Accounts.User, to: AuthController, path: "/auth")
sign_in_route(overrides: [DevWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default])
sign_out_route(AuthController, "/sign-out")
reset_route()
end
end