auto-confirm admin during setup, skip email verification
Some checks failed
deploy / deploy (push) Has been cancelled

Setup wizard no longer requires email delivery. Admin account is
auto-confirmed and auto-logged-in via token redirect. Adds setup
secret gate for prod (logged on boot), SMTP env var config in
runtime.exs, email_configured? helper, and admin warning banner
when email isn't set up. Includes plan files for this task and
the follow-up email settings UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-21 10:24:26 +00:00
parent 8e818da651
commit 9d9bd09059
17 changed files with 776 additions and 291 deletions

View File

@@ -95,33 +95,16 @@ if config_env() == :prod do
#
# Check `Plug.SSL` for all available options in `force_ssl`.
# ## Configuring the mailer
#
# Uncomment ONE of the blocks below and set the matching env vars.
# The API client is already configured in config/prod.exs (Swoosh.ApiClient.Req).
#
# Postmark (recommended):
#
# config :berrypod, Berrypod.Mailer,
# adapter: Swoosh.Adapters.Postmark,
# api_key: System.get_env("POSTMARK_API_KEY")
#
# Mailgun:
#
# config :berrypod, Berrypod.Mailer,
# adapter: Swoosh.Adapters.Mailgun,
# api_key: System.get_env("MAILGUN_API_KEY"),
# domain: System.get_env("MAILGUN_DOMAIN")
#
# SMTP (any provider):
#
# config :berrypod, Berrypod.Mailer,
# adapter: Swoosh.Adapters.SMTP,
# relay: System.get_env("SMTP_HOST"),
# port: String.to_integer(System.get_env("SMTP_PORT") || "587"),
# username: System.get_env("SMTP_USERNAME"),
# password: System.get_env("SMTP_PASSWORD"),
# tls: :if_available
# Mailer — configure via SMTP_HOST env var, or use the admin UI (email-settings plan)
if smtp_host = System.get_env("SMTP_HOST") do
config :berrypod, Berrypod.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: smtp_host,
port: String.to_integer(System.get_env("SMTP_PORT") || "587"),
username: System.get_env("SMTP_USERNAME"),
password: System.get_env("SMTP_PASSWORD"),
tls: :if_available
end
# Stripe and Printify keys are stored encrypted in the database and loaded
# at runtime by Berrypod.Secrets. No env vars needed for those.