Pow v0.1.0-alpha.1 Pow.Phoenix.Routes behaviour View Source

Module that handles routes.

The user_not_authenticated_path method will put a :request_path param into the path that can be used to redirect users back the the page they first attempted to visit. The after_sign_in_path method will look for a :request_path assigns key, and redirect to this value if it exists.

If the :request_path param is available to the :new or :create actions in Pow.Phoenix.SessionController, the controller will automatically assign a :request_path key. If there’s a :request_path assigns key, the pow_session_path(conn, :create) will be generated with a :request_path param.

Usage

defmodule MyAppWeb.Pow.Routes do
  use Pow.Phoenix.Routes
  alias MyAppWeb.Router.Helpers, as: Routes

  def after_sign_out_path(conn), do: Routes.some_path(conn, :index)
end

Update configuration with routes_backend: MyAppWeb.Pow.Routes.

Link to this section Summary

Link to this section Functions

Link to this function after_registration_path(conn) View Source
Link to this function after_sign_in_path(arg1) View Source
Link to this function after_sign_out_path(conn) View Source
Link to this function after_user_deleted_path(conn) View Source
Link to this function after_user_updated_path(conn) View Source
Link to this function user_already_authenticated_path(conn) View Source
Link to this function user_not_authenticated_path(conn) View Source

Link to this section Callbacks

Link to this callback after_registration_path(arg0) View Source
after_registration_path(Plug.Conn.t()) :: binary()
Link to this callback after_sign_in_path(arg0) View Source
after_sign_in_path(Plug.Conn.t()) :: binary()
Link to this callback after_sign_out_path(arg0) View Source
after_sign_out_path(Plug.Conn.t()) :: binary()
Link to this callback after_user_deleted_path(arg0) View Source
after_user_deleted_path(Plug.Conn.t()) :: binary()
Link to this callback after_user_updated_path(arg0) View Source
after_user_updated_path(Plug.Conn.t()) :: binary()
Link to this callback user_already_authenticated_path(arg0) View Source
user_already_authenticated_path(Plug.Conn.t()) :: binary()
Link to this callback user_not_authenticated_path(arg0) View Source
user_not_authenticated_path(Plug.Conn.t()) :: binary()