Skip to content

Google OAuth

Configure Google login (redirect URIs) and set OAUTH_GOOGLE_* variables.

1 min read

Overview

Google OAuth is optional. When configured, the backend provides endpoints that start the login flow and handle the callback.

Steps

Create OAuth credentials in Google Cloud

In the Google Cloud console, create OAuth client credentials (Web application).

Configure the redirect URI

The callback endpoint is:

/api/v1/auth/oauth/google/callback

If you use BACKEND_DOMAIN_URL and API_PREFIX to construct the redirect, make sure your Google “Authorized redirect URI” matches the final URL shape.

Set environment variables

OAUTH_GOOGLE_CLIENT_ID=
OAUTH_GOOGLE_CLIENT_SECRET=
BACKEND_DOMAIN_URL=http://localhost:3000
API_PREFIX=/api/v1

Restart the backend

Restart the backend process so the new values are loaded.