Public social signup into OAUTH_DEFAULT_ORG (role user, seat-checked); email-match links existing active user instead of duplicating. Server-side provider token validation via stdlib urllib only (no new dep): Google tokeninfo (aud + email_verified) and Facebook app/debug-token/me (is_valid, app_id, me.id==user_id). Fail-closed when creds unconfigured, rate-limited per-IP + per-email, /oauth/config leaks no secrets. Frontend: login buttons (only enabled providers), GSI + FB SDK on-demand, monochrome glyphs, TH/EN. Login page shows social buttons only when backend reports provider enabled. 348 backend tests pass (337 + 11 new OAuth), frontend build + 4/4 unit clean, manual security review PASS. Not pushed (push auto-deploys).
29 lines
897 B
Plaintext
29 lines
897 B
Plaintext
# LLM — OpenAI, DeepSeek, or any OpenAI-compatible endpoint
|
|
LLM_PROVIDER=deepseek
|
|
LLM_BASE_URL=
|
|
LLM_MODEL_NAME=deepseek-chat
|
|
LLM_API_KEY=replace_me
|
|
|
|
# Auth — set both values explicitly; never commit real values.
|
|
APP_ENV=development
|
|
JWT_SECRET=replace_with_a_random_secret_at_least_32_chars
|
|
BOOTSTRAP_ADMIN_PASSWORD=replace_with_a_strong_initial_password
|
|
|
|
# Storage root (relative to backend/)
|
|
DATA_DIR=./data
|
|
|
|
# OAuth (Google + Facebook) — all optional. Each provider is ENABLED only when
|
|
# every one of its values here is set and not a placeholder. Leave blank to
|
|
# disable. OAUTH_DEFAULT_ORG is the tenant public social signups land in; OAuth
|
|
# is disabled entirely while it's unset/missing.
|
|
# OAUTH_GOOGLE_CLIENT_ID=
|
|
# OAUTH_GOOGLE_CLIENT_SECRET=
|
|
# OAUTH_FACEBOOK_APP_ID=
|
|
# OAUTH_FACEBOOK_APP_SECRET=
|
|
# OAUTH_DEFAULT_ORG=org-public
|
|
|
|
# App
|
|
FLASK_HOST=0.0.0.0
|
|
FLASK_PORT=5001
|
|
FLASK_DEBUG=1
|