thetaPC
thetaPC

Reputation: 89

Why does my session get nulled when including a refresh token?

I am using a Credentials provider (username and password). I can authenticate the user and have the tokens returned without issues.

I'm following the Refresh Token Rotation article that Next-Auth provides.

However, the session never returns anything when I include the refresh token in the initial sign in (line 72). I can't console log anything in the session callback or even in any of the pages through getServerSideProps.

I can't even make it passed the initial sign up logic when including the refresh token.

If I don't include the refresh token, then the session data returns without problems.

What am I doing wrong? I've looked online and I keep seeing the same setup so I'm completely at a loss.

Upvotes: 1

Views: 1107

Answers (1)

Simone Urbani
Simone Urbani

Reputation: 130

Probably adding the refresh token your final token size is major than 4096 bytes. See more at jwt-callback docs

Upvotes: 0

Related Questions