mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-20 05:13:10 +12:00
a939dde9b9
This is missing a bunch of features that you probably want to use (eg confirmation, password resets), but it's a pretty good place to put a stake in the sand and say it works.
24 lines
595 B
Elixir
24 lines
595 B
Elixir
defmodule DevServer do
|
|
@moduledoc """
|
|
This module provides an extremely simplified authentication UI, mainly for
|
|
local development and testing.
|
|
"""
|
|
|
|
use Supervisor
|
|
|
|
def start_link(init_arg), do: Supervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
|
|
|
|
@impl true
|
|
def init(_init_arg) do
|
|
opts =
|
|
:ash_authentication
|
|
|> Application.get_env(DevServer, [])
|
|
|> Keyword.delete(:start?)
|
|
|
|
[
|
|
{DevServer.Session, []},
|
|
{Plug.Cowboy, scheme: :http, plug: DevServer.Plug, options: opts}
|
|
]
|
|
|> Supervisor.init(strategy: :one_for_all)
|
|
end
|
|
end
|