Create OAuth2 credentials following the OAuth2 Proxy Google Provider documentation
Add the following URLs to the OAuth2 Client settings in Google Cloud Console:
- Authorized JavaScript origins:
http://localhost:4200
- Authorized redirect URIs:
http://localhost:4200/oauth2/callback
Copy the .env.local.sample
file to .env.local
and set the environment variables.
cp .env.local.sample .env.local
Run the following command to start the Docker containers.
docker compose up
Copy the .env.sample
file to .env
and set the environment variables.
cp .env.sample .env
Run the following command to authenticate with Google Cloud.
gcloud auth application-default login
Run the following command to deploy the infrastructure except for Cloud Run. Make note of the service-url that is output.
npm run deploy
Add the following URLs to the OAuth2 Client settings in Google Cloud Console:
- Authorized JavaScript origins:
{service-url}
- Authorized redirect URIs:
{service-url}/oauth2/callback
Set the secrets in the Secret Manager.
oauth2-client-id
oauth2-client-secret
oauth2-proxy-cookie-secret
Set NO_CLOUD_RUN
to false
in the .env
file and run the following command to deploy Cloud Run.
npm run deploy