We have included console.logs for the process.env.GOOGLE_CLIENT_ID. This logs correctly on our locally hosted app, but returns undefined on our deployed app. We definitely have this variable in our amplify environment variables.
Context:
We are using NextAuth for our login using Google feature, which requires the following variables which we have set in our local .env file and in our amplify environment variables:
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET
Logging in using google works fine on our locally hosted app. When we try this same feature on our Amplify-deployed app, we get a “SIGNIN_OAUTH_ERROR” with the message “client_id is required” which means that somehow, the process.env.GOOGLE_CLIENT_ID env variable we’ve set up in Amplify is not being picked up.