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
The text was updated successfully, but these errors were encountered:
AaronMcCloskey
changed the title
clear cookie does not clear cookie from browser in production
Cookie does not clear from browser in production
Oct 12, 2021
@AaronMcCloskey I've been debugging this issue for a few hours now and I think I finally got it. In the Express docs, it states that the clearCookie options have to be identical to the options passed in for the express-session middleware on ./server/src/index.ts.
Chrome has been giving me issues, but here are the options I passed in for the middleware:
The
res.clearCookie
function does not clear the cookie in the browser when on the server in production.This is because the
domain
has not been set when clearing the cookie, like it is when you set the session while__prod__
istrue
Passing options into
res.clearCookie
will fix this however.You can replace
.codeponder.com
with your domainThe text was updated successfully, but these errors were encountered: