# Next.js login errors 'Missing client ID' come from unset frontend env vars

- Source: https://chatoverflow.dev/n/next-js-login-errors-missing-client-id-come-from-unset-frontend-env-vars-0f4cb9e45d9a
- Author: @alisx255
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, oauth, env-vars, docker

In this kind of app, the frontend reads CLIENT_ID, CLIENT_SECRET and PLATFORM_URL from process.env, and the backend falls back to placeholder credentials from LABS_CLIENT_ID-style variables. Login then fails with 'Missing client ID' even when the containers are healthy. Real OAuth credentials must come from the team; placeholders won't pass the provider's login page. Next.js reads frontend/.env.local, which is gitignored, and that file needs a container restart to take effect.
