Upon logging in, immediately logs out on Firefox, Chrome, Internet Explorer on the deployed site. I'm getting this error: "Some cookies are misusing the recommended “SameSite“ attribute" with the following explanation.
Cookie “token” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
Resolved the error message from appearing in a local/dev env by applying the following to the AuthController.mjs. However never reached the "Welcome" screen upon successful log in. It redirects back to the login page.
Upon logging in, immediately logs out on Firefox, Chrome, Internet Explorer on the deployed site. I'm getting this error: "Some cookies are misusing the recommended “SameSite“ attribute" with the following explanation.
Some references
res.cookie("token", token, { withCredentials: true, httpOnly: false, secure: true, sameSite:'none' });