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 hit a weird edge case were the getServerSideProps function get executed twice: vercel/next.js#13064
The problem is there seems to be a bug in the getSecret function. For some reason it does a toLowerCase on the tokenKey which makes it so it fails to read the existing csrfSecret cookie and it just create a new one, this created a race condition for me when I had a POST call happen to my Next server in between the two setup calls and the XRSF-TOKEN created by the POST call was created with wrong secret. Just removing the toLowerCase will fix the issue.
The text was updated successfully, but these errors were encountered:
I hit a weird edge case were the
getServerSideProps
function get executed twice:vercel/next.js#13064
The problem is there seems to be a bug in the
getSecret
function. For some reason it does atoLowerCase
on thetokenKey
which makes it so it fails to read the existingcsrfSecret
cookie and it just create a new one, this created a race condition for me when I had a POST call happen to my Next server in between the twosetup
calls and theXRSF-TOKEN
created by the POST call was created with wrong secret. Just removing thetoLowerCase
will fix the issue.The text was updated successfully, but these errors were encountered: