This might happen due to the cookieData returned by loginByUsernamePassword (controllers/auth.js) func not set sameSite='none' explicitly. and so it causes some issues with the httponly cookies in crosssite req https://stackoverflow.com/a/74036481/22533611
Is it left omitted on purpose?
|
return { |
|
...payload, |
|
accessToken, |
|
refreshToken, |
|
cookieData: { |
|
httpOnly: true, |
|
secure: true, |
|
maxAge: expiresInMins * 60 * 1000, // convert minutes to milliseconds |
|
}, |
|
const { accessToken, refreshToken, cookieData, ...payloadData } = payload; |
|
|
|
res.cookie('accessToken', accessToken, cookieData); |
|
res.cookie('refreshToken', refreshToken, cookieData); |
|
|
|
res.send({ accessToken, refreshToken, ...payloadData }); |
This might happen due to the
cookieDatareturned byloginByUsernamePassword(controllers/auth.js) func not setsameSite='none'explicitly. and so it causes some issues with the httponly cookies in crosssite req https://stackoverflow.com/a/74036481/22533611Is it left omitted on purpose?
DummyJSON/src/controllers/auth.js
Lines 45 to 53 in 3ba59c1
DummyJSON/src/routes/auth.js
Lines 11 to 16 in 3ba59c1