Comments (6)
No need to add domain it worked for me like this...
this.cookieService.delete('myCookie', ' / ');
from ngx-cookie-service.
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.
Had the same issue deleting cookies with deleteAll() method it doesn't work either
from ngx-cookie-service.
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.
I have same problem!
from ngx-cookie-service.
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)
- Add Angular 14 Support HOT 1
- Adopt NX to the project HOT 1
- Namespace '"/Users/p21-0008/Desktop/Dushyant/Demo/Angular CRUD With Authentication/frontend/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'. HOT 2
- ngx-cookie-service-ssr is it possible to use this in angular V10? HOT 7
- Ability to set a global/default domain for set and delete HOT 5
- ngx-cookie-service does not work on Angular 12 with Ivy Compiler HOT 5
- Share cookie between subdomains HOT 11
- Possibility to create cookie on server side HOT 10
- Setting a cookie value is expecting browser reload in v15.0.0 HOT 3
- Able to access cookie even after deletion HOT 4
- feat(core): switches to PNPM HOT 1
- Auto cast integer to string HOT 2
- Get raw cookies value HOT 2
- Get expiry date HOT 4
- TS2307: Cannot find module @angular/ssr/tokens or its corresponding type declarations. HOT 5
- Support Angular 16 HOT 4
- Angular v17 SSR - InjectionToken for REQUEST/RESPONSE not working? HOT 16
- NgAdd Library Schematic HOT 3
- Support for partitioned property for CHIPS HOT 3
- '"ngx-cookie-service-ssr"' has no exported member named 'CookieService'. Did you mean 'SsrCookieService'?ts(2724) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-cookie-service.