add admin account recovery via setup secret
All checks were successful
deploy / deploy (push) Successful in 1m33s
All checks were successful
deploy / deploy (push) Successful in 1m33s
When email isn't configured, the login page now hides the magic link form and shows a recovery link. The /recover page logs the setup secret to server logs and lets the admin reset their password with it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -146,12 +146,14 @@ defmodule BerrypodWeb.Router do
|
||||
scope "/", BerrypodWeb do
|
||||
pipe_through [:browser]
|
||||
|
||||
# Token-based auto-login after setup account creation
|
||||
# Token-based auto-login after setup/recovery
|
||||
get "/setup/login/:token", SetupController, :login
|
||||
get "/recover/login/:token", SetupController, :recover_login
|
||||
|
||||
live_session :setup,
|
||||
on_mount: [{BerrypodWeb.UserAuth, :mount_current_scope}] do
|
||||
live "/setup", Setup.Onboarding, :index
|
||||
live "/recover", Setup.Recover, :index
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user