Pow v1.0.8 Pow.Phoenix.Router View Source

Handles Phoenix routing for Pow.

Usage

Configure lib/my_project_web/router.ex the following way:

defmodule MyAppWeb.Router do
  use MyAppWeb, :router
  use Pow.Phoenix.Router

  pipeline :browser do
    plug :accepts, ["html"]
    plug :fetch_session
    plug :fetch_flash
    plug :protect_from_forgery
    plug :put_secure_browser_headers
  end

  scope "/" do
    pipe_through :browser

    pow_routes()
  end

  # ...
end

Link to this section Summary

Link to this section Functions

Pow router macro.

Use this macro to define the Pow routes.

Example

scope "/" do
  pow_routes()
end
Link to this function

validate_scope!(module) View Source
validate_scope!(
  atom()
  | [
      %Phoenix.Router.Scope{
        alias: term(),
        as: term(),
        assigns: term(),
        host: term(),
        path: term(),
        pipes: term(),
        private: term()
      }
    ]
) :: :ok | no_return()