I am trying to deploy a NextJs application to vercel, I am using next auth to authenticate via discord.
Locally it is working fine. The right callback URL's are all configured and NEXT_AUTH_URL is configured too.
export default NextAuth({
providers: [
DiscordProvider({
clientId: process.env.DISCORD_CLIENT_ID,
clientSecret: process.env.DISCORD_CLIENT_SECRET
})
],
secret: process.env.SECRET,
jwt: {
signingKey: process.env.JWT_SIGNING_PRIVATE_KEY,
},
database: process.env.DATABASE_URL,
adapter: PrismaAdapter(prisma),
})
When trying to log in on the deployed site, however, I am receiving a 500 CLIENT_FETCH_ERROR.