This is the logs
I have built an amazon clone and when i deployed it to vercel the signin with google is not working, and i got this error:
Server error
There is a problem with the server configuration.
Check the server logs for more information.
i have added my environement variables
3
Answers
I have resolved this issue , if added uri on the cridentials of my project on google cloud platform and i added also a NEXTAUTH_SERET and redeployed the build THank you everyone
Kindly share screenshot of the browser console so we can get some more clarity on the error.
I had also faced a similar error once, I’ll tell you how I resolved it. It may work out for you as well.
Check in your .env file if you have changed the callback URL to the deployment url and not localhost
You may need to generate a Nextauth secret key. You can easily do so by running the below command.
openssl rand -base64 32
This will give you a alphanumeric string. Copy and paste that as NEXTAUTH_SECRET = ‘generated-value’ in the .env file
Then in your pages/api/auth/[…nextauth.js] file, add this secret as well like shown below.
If this works out it’s good, else you have to share your console log’s screenshot so we can debug further if needed.
hi I had the same problem and I added NEXTAUTH_SECRET and it show an error with secret: process.env.NEXTAUTH_SECRET