Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy cookie not working in iframes #560

Open
Doaa-Ismael opened this issue Aug 15, 2022 · 0 comments
Open

Destroy cookie not working in iframes #560

Doaa-Ismael opened this issue Aug 15, 2022 · 0 comments

Comments

@Doaa-Ismael
Copy link

Doaa-Ismael commented Aug 15, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant