You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on building a proof-of-concept (PoC) app using React technologies, following best practices.
However, the React ecosystem feels more complex than others, mainly because there are so many different ways to achieve the same results.
I'm trying to set up a stack using Next.js 15 + NextAuth.js 5 + Prisma + PostgreSQL, but I’ve noticed that many available resources don’t cover the latest versions of these tools, and a lot of examples focus on OAuth flows.
Right now, I’m running into the following issues:
GET /api/auth/providers → 500 error
GET /api/auth/error → 500 error
My signIn callbacks or the authorize function don’t seem to be called, and I don’t understand why.
I do not understand which part need to be included the NextAuth({}) object (auth.ts in root or route.ts in api)
I’ll share the relevant code context below, and any kind of advice is welcome.
Please don’t hesitate to point out mistakes — I’m just getting started and really appreciate your support and patience as I learn.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm currently working on building a proof-of-concept (PoC) app using React technologies, following best practices.
However, the React ecosystem feels more complex than others, mainly because there are so many different ways to achieve the same results.
I'm trying to set up a stack using Next.js 15 + NextAuth.js 5 + Prisma + PostgreSQL, but I’ve noticed that many available resources don’t cover the latest versions of these tools, and a lot of examples focus on OAuth flows.
Right now, I’m running into the following issues:
GET /api/auth/providers → 500 error
GET /api/auth/error → 500 error
My signIn callbacks or the authorize function don’t seem to be called, and I don’t understand why.
I do not understand which part need to be included the NextAuth({}) object (auth.ts in root or route.ts in api)
I’ll share the relevant code context below, and any kind of advice is welcome.
Please don’t hesitate to point out mistakes — I’m just getting started and really appreciate your support and patience as I learn.
middleware
login page
route.ts
Beta Was this translation helpful? Give feedback.
All reactions