feat(auth): add admin bootstrap and username login

Initialize admin bootstrap settings during startup, persist username support in auth flows, and align frontend auth requests with local API behavior.
This commit is contained in:
2026-03-24 15:07:19 +08:00
parent 6f594631e9
commit a3aa15d339
13 changed files with 787 additions and 27 deletions

View File

@@ -16,10 +16,18 @@ DATA_DIR=./data
CHROMA_PERSIST_DIR=./data/chroma
UPLOAD_DIR=./data/uploads
MAX_UPLOAD_SIZE=52428800
# Supported values: ch | en
MINERU_LANGUAGE=ch
# === JWT ===
ACCESS_TOKEN_EXPIRE_MINUTES=1440
# === 管理员账号 Bootstrap ===
ADMIN=admin
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=
ADMIN_FULL_NAME=Administrator
# === 定时任务 ===
SCHEDULER_ENABLED=true
DAILY_PLAN_TIME=00:00