Add Google OAuth configuration and enhance API functionality

- Updated .env.example with WEB_GOOGLE_CLIENT_ID and WEB_GOOGLE_CLIENT_SECRET for Google OAuth.
- Modified README.md to reflect changes in docker-compose for unified web and API deployment.
- Enhanced auth.py to support NextAuth JWT session cookies.
- Improved main.py with lifespan management and additional API endpoints.
- Added mod_overview endpoint in mod.py for MOD panel statistics.
- Updated docker-compose.yml for local API and web service configurations.
This commit is contained in:
2026-03-30 13:55:12 +07:00
parent 5da7cc4530
commit ac5f5db447
6 changed files with 590 additions and 26 deletions
+4
View File
@@ -8,6 +8,10 @@ MOBILE_JWT_SECRET=replace-with-strong-secret
# Comma-separated allowed Google OAuth client IDs (web + android if needed)
GOOGLE_CLIENT_ID=web-client-id.apps.googleusercontent.com,android-client-id.apps.googleusercontent.com
# Reader web (NextAuth) Google OAuth (single web client)
WEB_GOOGLE_CLIENT_ID=web-client-id.apps.googleusercontent.com
WEB_GOOGLE_CLIENT_SECRET=replace-with-web-google-client-secret
# CORS (comma-separated), * for all in local dev
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000