Next.js Discord

Discord Forum

Auth working in dev but not in prod ?

Unanswered
Genio posted this in #help-forum
Open in Discord
Hey,

So i implemented auth correctly in dev, but when i pushed it to prod on my server i keep getting

Uncaught (in promise) SyntaxError: Unexpected token '<', "<html> <h"... is not valid JSON

the authorize function in the authOptions works perfectly and i can see the logged results in the terminal. However i keep getting 502 errors

i provided a photo from my networks tab after logging in.

using next-auth version 4.24.7

3 Replies

i have two websties deployed in the same server. The first one's auth works perfectly, but the 2nd one doesnt
They have the same uri but different aliases
admin.blahblah.com
provider.blahblah.com

differnet secret and different urls in env
bump