Giter Site home page Giter Site logo

Comments (6)

jeeva-nikam avatar jeeva-nikam commented on May 18, 2024 7

No need to add domain it worked for me like this...
this.cookieService.delete('myCookie', ' / ');

from ngx-cookie-service.

paroe avatar paroe commented on May 18, 2024 2

The browser (and therefore the cookie-service) simply just have no way of knowing the paths and domains of the set cookies. For security reasons, they can only access the cookies of the current path and domain.

Here you can find a good explanation of the issue:

For security, you’re not allowed to edit (or delete) a cookie on another site. Since there’s no guarantee that you own both foo.domain.com and bar.domain.com, you won’t be allowed to edit the cookies of foo.domain.com from bar.domain.com and vice versa.

The only thing you can do is to take an educated guess, like in this attempt.

from ngx-cookie-service.

roelzkie15 avatar roelzkie15 commented on May 18, 2024 1

Had the same issue deleting cookies with deleteAll() method it doesn't work either

from ngx-cookie-service.

mustafaekim avatar mustafaekim commented on May 18, 2024

Note: If get method would not return a string but an object with path & domain of the cookie, I would be able to delete all the cookies because I would know their path & domains

from ngx-cookie-service.

sahajrajmalla avatar sahajrajmalla commented on May 18, 2024

I have same problem!

from ngx-cookie-service.

rajibhalder avatar rajibhalder commented on May 18, 2024

I have the same problem as my frontend server hosted on abc.com but api server hosted on xyz.com server. When log out, I want to delete all cookies (e.g accessToken, JSESSIONID) of xyz.com also.

from ngx-cookie-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.