🗄️Login app info is wrong (invalid_client)
Error 401: invalid_client — The OAuth client was not found.
The client ID or secret in your social login settings is wrong or was deleted.
🤔 Why does it happen?
- The client ID or secret in the environment variables was copied wrong (including spaces at the start or end)
- That OAuth client was deleted in the Google console, or one from a different project was used
🔧 Try this
- Copy the ID again from Google Cloud Console → Credentials and put it in
- Deploy again after changing the environment variables
🤖 Ask your AI like this
I get 'Error 401: invalid_client' when logging in with Google. Please tell me how to check that the environment variable names and values are read correctly in the code. Don't ask me for the values themselves.
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Database connection failed
Can't reach database server - Table doesn't exist
relation "…" does not exist - Login address mismatch (redirect_uri_mismatch)
Error 400: redirect_uri_mismatch - Blocked by security rules (RLS), so it won't save
new row violates row-level security policy - Tried to save a value that already exists (duplicate)
duplicate key value violates unique constraint - Login info has expired (JWT)
JWT expired - Google login blocked (app not verified, testing mode)
Access blocked: app has not completed the Google verification process - Prisma isn't ready (prisma generate)
@prisma/client did not initialize yet. Please run "prisma generate"