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 encountering issues when combining next-auth v5 with next-intl middleware in my Next.js application. While everything works perfectly in development mode, deploying the app results in internal server errors.
Problem Details:
Libraries Involved:
next-auth v5
next-intl
Deployment : Self host
Issue:
Combining next-auth v5 middleware with next-intl causes internal server errors upon deployment.
The application functions correctly in development mode but fails in the production build. On the other hand, if I use only one of the two middlewares, I have no problem at all in production.
Attempts to Resolve:
Followed examples from next-auth v4 documentation, which are now outdated.
Tried nesting middleware and handling routes conditionally.
Ensured configurations align with the latest next-auth v5 standards.
Sample Middleware Implementation (not working, provoking an internal server error in production) :
Could you please assist in resolving the compatibility issues between next-auth v5 and next-intl middleware? Any guidance or updated examples for integrating these two libraries in the latest versions would be greatly appreciated.
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
-
Hi 👋,
I'm encountering issues when combining next-auth v5 with next-intl middleware in my Next.js application. While everything works perfectly in development mode, deploying the app results in internal server errors.
Problem Details:
Libraries Involved:
Deployment : Self host
Issue:
Combining next-auth v5 middleware with next-intl causes internal server errors upon deployment.
The application functions correctly in development mode but fails in the production build. On the other hand, if I use only one of the two middlewares, I have no problem at all in production.
Attempts to Resolve:
Sample Middleware Implementation (not working, provoking an internal server error in production) :
Request:
Could you please assist in resolving the compatibility issues between next-auth v5 and next-intl middleware? Any guidance or updated examples for integrating these two libraries in the latest versions would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions