Skip to content

Destroy cookie not working in iframes #560

@Doaa-Ismael

Description

@Doaa-Ismael

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions