-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
Hi,
first things first - I'm really a newbie in Elixir and Phoenix.
I wanted to use live_admin behind authentication. I've configured it and run mix phx.gen.auth Administration Admin admins.
I've setup the router like so:
scope "/", WowWeb do
pipe_through [:browser, :require_authenticated_admin]
live_session :require_authenticated_admin,
on_mount: [{WowWeb.AdminAuth, :ensure_authenticated}] do
live "/admins/settings", AdminSettingsLive, :edit
live "/admins/settings/confirm_email/:token", AdminSettingsLive, :confirm_email
end
live_admin "/admin", title: "Wow Project" do
admin_resource "/users", Wow.Admin.User
end
endTwo questions:
- is this the right way to do auth?
- if yes, how can I place the "log out" link in the live layout?
phx.gen.authgenerate layouts undercomponents/layouts/dir. But it seems that live_admin is using it's own layouts.
Metadata
Metadata
Assignees
Labels
No labels