Skip to content

JWT_SESSION_ERROR in next auth with next.js #6030

Answered by jsinh
nileshzala005 asked this question in Help
Discussion options

You must be logged in to vote

This might be due to restrictions at the web server level in the hosting environment. Assuming you are using NodeJS and NextJS and running a web proxy behind Nginx or Apache.

In OAuth 3-legged process OAuth identity server sends data back. In case when the Authorize response callback URL - body or headers is too large or big, then what your hosting environment supports may give errors.

Check web server logs and tweak the config for proxy-body-size, proxy-buffer-size, fastcgi-buffer-size etc, in the case of Nginx and see if it helps.

Suggesting based on the mention that it works locally but shows an error in deployed version

Replies: 5 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@nileshzala005
Comment options

@nileshzala005
Comment options

@rongrat9
Comment options

Answer selected by nileshzala005
Comment options

You must be logged in to vote
9 replies
@Himan-Miku
Comment options

@Dekita
Comment options

@LuciKritZ
Comment options

@AyedSamy
Comment options

@NguyenVu04
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
question Ask how to do something or how something works
Converted from issue

This discussion was converted from issue #6018 on December 12, 2022 13:04.