This guide explains how to configure OAuth2 Proxy for authentication using Google OAuth in production. Development setup does not include OAuth2 Proxy by default.
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Set application type to Web application
- Add the following to Authorized redirect URIs:
https://<your-domain>/oauth2/callback
- Save and copy your Client ID and Client Secret
- See Generating a Cookie Secret (official docs) for more options.
Note:
- For production, use
docker-compose.prod.ymland set all variables as above. - For development, OAuth2 Proxy is not enabled by default.
- Adjust domain values to match your deployment.