silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
400 stars 321 forks source link

[Bug] [Android, iOS] Cookies not being cleared #401

Open luisgon1 opened 3 years ago

luisgon1 commented 3 years ago

Describe the bug I cant find a way of clearing the cookies. I have used different steps to try to clear the cookies but they still are being sent on requests. I have tried: cordova.plugin.http.clearCookies(); * underscores for the advancedHttpCookieStore are removed by the editor ** window.localStorage.removeItem('advancedHttpCookieStore'); document.cookie = key + '=; Max-Age=0'; And no luck.

Ionic:

Ionic CLI : 6.13.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.3.1 @angular-devkit/build-angular : 0.901.12 @angular-devkit/schematics : 9.1.15 @angular/cli : 9.1.15 @ionic/angular-toolkit : 2.3.1

Capacitor:

Capacitor CLI : 2.4.0 @capacitor/core : 2.4.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : none Cordova Plugins : no whitelisted plugins (2 plugins total)

Utility:

cordova-res : not installed native-run : not installed

System:

Android SDK Tools : 26.1.1 (/Users/luis.gonzalez/Library/Android/sdk) ios-deploy : 1.10.0 NodeJS : v12.18.2 (/usr/local/bin/node) npm : 7.6.0 OS : macOS Catalina Xcode : Xcode 12.4 Build version 12D4e

Minimum viable code to reproduce

  1. Make a request
  2. Call clearCookies()
  3. Make a request
  4. Request still sends cookie

e.g.: cordova.plugin.http.clearCookies(); window.localStorage.removeItem('advancedHttpCookieStore'); document.cookie = key + '=; Max-Age=0';

vtebano13 commented 3 years ago

Any status on this?

silkimen commented 2 years ago

Do I understand correctly that you are using this plugin with capacitor? This plugin is primarily meant to be used with cordova and it is not tested for capacitor.

luisgon1 commented 2 years ago

Yes we use it with Capacitor, but this has been fixed it was an issue on my end.

On Wed, Mar 30, 2022, 8:19 PM Sefa Ilkimen @.***> wrote:

Do I understand correctly that you are using this plugin with capacitor? This plugin is primarily meant to be used with cordova and it is not tested for capacitor.

— Reply to this email directly, view it on GitHub https://github.com/silkimen/cordova-plugin-advanced-http/issues/401#issuecomment-1083927046, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRCRKGBFYKHCSUDWLHTMJLVCT4RPANCNFSM4YVN74YA . You are receiving this because you authored the thread.Message ID: @.***>

wengki commented 1 year ago

I got the same problem and still need a solution. Thanks if anyone can provide any pointers or assistance.