'There is a problem with the server configuration. NextAuth

I used google as an auth provider with next auth. Configured all the the environment variables both in production and development. It's working perfectly in dev mode but in production it shows this error whenever i try to sign in.

I deployed the site to vercel and had setup google id, secret and NEXTAUTH_URL variables there.



Solution 1:[1]

edit pages/api/auth/[...nextauth].js add:

secret:process.env.SECRET

and add a SECRET environment variable containing anything you want

SECRET env variable in vercel

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ferdintel