feat: sync Telegram Login OIDC provider

This commit is contained in:
A 2026-07-21 15:46:24 +08:00
parent 30774f8c39
commit ebead9e98c
63 changed files with 11374 additions and 37 deletions

View file

@ -159,6 +159,24 @@ TELESRV_STICKER_SEED_DIR=data/sticker-seed
# through nginx; public canonical URLs use TELESRV_PUBLIC_BASE_URL.
TELESRV_PUBLIC_LINK_WEB_ADDR=127.0.0.1:2401
# Self-hosted Telegram Login / OpenID Connect. The provider is mounted on the
# public-link listener above. Keep disabled until all three local key files
# have been generated with `go run ./cmd/telegramloginkeygen -mode init`.
TELESRV_TELEGRAM_LOGIN_ENABLE=false
TELESRV_TELEGRAM_LOGIN_ISSUER=https://telesrv.net
TELESRV_TELEGRAM_LOGIN_ALLOW_LOOPBACK_HTTP=false
TELESRV_TELEGRAM_LOGIN_SIGNING_KEYS_FILE=data/telegram-login/signing-keys.json
TELESRV_TELEGRAM_LOGIN_CODE_KEYS_FILE=data/telegram-login/code-keys.json
TELESRV_TELEGRAM_LOGIN_SECRET_PEPPER_FILE=data/telegram-login/client-secret-pepper
TELESRV_TELEGRAM_LOGIN_REQUEST_TTL=5m
TELESRV_TELEGRAM_LOGIN_CODE_TTL=2m
TELESRV_TELEGRAM_LOGIN_ID_TOKEN_TTL=1h
# Trust only the loopback nginx hop in the documented single-host deployment.
TELESRV_TELEGRAM_LOGIN_TRUSTED_PROXY_CIDRS=127.0.0.1/32,::1/128
TELESRV_TELEGRAM_LOGIN_RETENTION=168h
TELESRV_TELEGRAM_LOGIN_SWEEP_INTERVAL=5m
TELESRV_TELEGRAM_LOGIN_SWEEP_BATCH=500
# AI compose for TDesktop/Android input box rewrite/polish.
# The local provider is deterministic and does not call external services.
TELESRV_AI_ENABLED=true