Create a Web Application OAuth Client
In the Google Auth Platform / Clients area, create an OAuth client of type Web application. For local development add authorized JavaScript origin http://localhost:3000 and authorized redirect URI http://localhost:3000/api/auth/callback/google. For production add your real HTTPS origin and exact callback URL, e.g. https://app.your-domain.example/api/auth/callback/google.
Redirect URI must match exactly
Protocol, host, port, path, and trailing slash must match. Never use wildcard redirect URIs.