feat: fixed OAUTH issues

- Added BACKEND_URL to .env.example for optional OAuth callback configuration when behind a reverse proxy with HTTPS.
- Updated fastapi-users dependency to version 15.0.3 in pyproject.toml.
- Updated argon2-cffi and email-validator versions in uv.lock.
- Enhanced Google OAuth integration in app.py to handle secure contexts for CSRF cookies.
- Updated GoogleLoginButton component to include credentials in fetch requests.
- Updated documentation to reflect the new BACKEND_URL variable in both docker and manual installation guides.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-19 14:19:30 -08:00
parent 46f608486d
commit 3f2b915cd0
7 changed files with 67 additions and 50 deletions

View file

@ -208,6 +208,7 @@ Before you begin, ensure you have:
| DATABASE_URL | PostgreSQL connection string (e.g., `postgresql+asyncpg://postgres:postgres@localhost:5432/surfsense`) |
| SECRET_KEY | JWT Secret key for authentication (should be a secure random string) |
| NEXT_FRONTEND_URL | URL where your frontend application is hosted (e.g., `http://localhost:3000`) |
| BACKEND_URL | (Optional) Public URL of the backend for OAuth callbacks (e.g., `https://api.yourdomain.com`). Required when running behind a reverse proxy with HTTPS. Used to set correct OAuth redirect URLs and secure cookies. |
| AUTH_TYPE | Authentication method: `GOOGLE` for OAuth with Google, `LOCAL` for email/password authentication |
| GOOGLE_OAUTH_CLIENT_ID | (Optional) Client ID from Google Cloud Console (required if AUTH_TYPE=GOOGLE) |
| GOOGLE_OAUTH_CLIENT_SECRET | (Optional) Client secret from Google Cloud Console (required if AUTH_TYPE=GOOGLE) |