Twitter oauth2 login doesn't work in production even if it works locally. #12974
-
I've implemented Twitter Oauth2 login function using auth.js v5.0.0-beta.27 & prisam & mongodb & next.js v15.3.1 This is configuration for auth.js
My project was working fine locally, but after deploying my next.js project to Vercel, it stopped working. After clicking the 'Authorize App' button on the Twitter authentication page, I was redirected to an error page. What is the problem? Is this a Twitter issue or an auth.js issue? This is my Vercel log Please help me. 😓 Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I've solved it myself. In the previous version, I added postinstall command on the package.json like this
But I removed it and changed original build command like this
So for now, everything works well! |
Beta Was this translation helpful? Give feedback.
I've solved it myself.
In the previous version, I added postinstall command on the package.json like this
"postinall": "prisma generate"
But I removed it and changed original build command like this
"build": "prisma generate && next build"
So for now, everything works well!