I would like to create a new Google API project for a nextJS webapp. I cannot understand how to get the API GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET without a domain.
I have to setup in the .env file
# Next Auth Google provider
GOOGLE_CLIENT_ID="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GOOGLE_CLIENT_SECRET="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
I tried looking for solutions but I cannot find the resources.
2
Answers
I realized that the field is optional and can be changed later in the console. Try to put in something to avoid the validation error and use the following resource to update the authorized origin to localhost.
https://nextjstemplates.com/docs/authentication/google-login
This is what worked for localhost.
Just leave the domain empty and you will get your credentials. This is a bad UX on Google’s part but it is done to prevent users from skipping the field just because they can.