Destroy cookie not working in iframes
Opened this issue · 0 comments
Doaa-Ismael commented
I have an application that sets a cookie and removes it, and this application is accessed via iframe within another application.
destroy cookie works properly on safari, but not working on chrome.
I have a question why do we override the cookie with an empty string instead of deleting it?
Set cookie
setCookie(null, 'my-cookie, token, { path: '/', maxAge: Date.now() + 5 * 365 * 24 * 60 * 60, // 5 Years From Now, sameSite: 'None', secure: true });
Destory cookie
destroyCookie(null, 'my-cookie', { path: '/', })
How to make destroy cookie work on chrome as well? should I pass all the options I added while setting the cookie?