feat: Add default admin user creation and root route redirects

- Auto-create admin user on first startup (admin@example.com/admin)
- Add redirects from /, /dashboard, /login to /web/ for better UX
- Enhanced startup logging with login credentials
- Improved config documentation for admin_emails

Fixes initial setup UX issues with web UI access and authentication.
This commit is contained in:
wjbeckett
2025-07-18 16:04:01 +10:00
parent df7d00ad99
commit 4177409b59
4 changed files with 96 additions and 2 deletions

View File

@@ -36,6 +36,9 @@ email_password_resets = false # if true, you also need to set up SMTP (notificat
token_secret = "CHANGE_ME_GENERATE_RANDOM_STRING" # generate a random string with "openssl rand -hex 32", e.g. here https://www.cryptool.org/en/cto/openssl/
session_lifetime = 86400 # this is how long you will be logged in after loggin in, in seconds
# Admin users: Users who register with these email addresses will automatically become administrators
# If no users exist in the database, a default admin user will be created with the first email in this list
admin_emails = ["admin@example.com", "admin2@example.com"]
# OpenID Connect settings