-
Question 💬After using signIn with Google Provider, instead of redirecting to How to reproduce ☕️package.json "next": "12.2.4",
"next-auth": "^4.10.3",
"react": "18.2.0", authOptions export const authOptions: NextAuthOptions = {
callbacks: {
session({ session, user }) {
if (session.user) {
session.user.id = user.id;
session.user.isOnboarded = user.isOnboarded;
}
return session;
},
},
adapter: PrismaAdapter(prisma),
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
}),
],
pages: {
signIn: "/sign-in",
},
}; env # Prisma
DATABASE_URL=xxx
# Next Auth
NEXTAUTH_SECRET=xxx
NEXTAUTH_URL=http://localhost:3000
# Next Auth Google Provider
GOOGLE_CLIENT_ID=xxx
GOOGLE_CLIENT_SECRET=xxx Here is the current repo and it is deploy here Contributing 🙌🏽No, I am afraid I cannot help regarding this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I tried logging the error when deploying and get this error
Seems to be a prisma error. For reference, my DATABASE_URL env is |
Beta Was this translation helpful? Give feedback.
-
Found a fix for this, in local env I surround the DATABASE_URL with backticks, but the backticks should be remove on vercel env variable. |
Beta Was this translation helpful? Give feedback.
Found a fix for this, in local env I surround the DATABASE_URL with backticks, but the backticks should be remove on vercel env variable.