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

Cookies are not stored on set cookie response header #73

Open
horodnicdragos opened this issue Feb 7, 2018 · 5 comments
Open

Cookies are not stored on set cookie response header #73

horodnicdragos opened this issue Feb 7, 2018 · 5 comments

Comments

@horodnicdragos
Copy link

horodnicdragos commented Feb 7, 2018

I'm not sure if my issue is related to this one (#22) but when I use this plugin in the simulator cookies are never set by setCookie from response headers provided by my backend on login. It doesn't matter how many times I make this request, the cookies are never set. I can login just fine when I run the app from my device, and according to the logs from the backend, the cookie is set on all following requests.

Here is my ionic info output:

ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

Cordova Platforms : none
Ionic Framework   : ionic1 1.3.5

System:

ios-deploy : 1.9.1
ios-sim    : 5.0.13
Node       : v8.9.1
npm        : 5.6.0
OS         : macOS High Sierra
Xcode      : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Any clues?

@frenmanoj
Copy link

frenmanoj commented Feb 7, 2018

I'm facing exactly the same problem. It's working fine for me too on real devices. But no luck with the simulators. However, the cookie info seems to be included in the request header if "localhost" is the server. One thing to note here is, it doesn't work if I replace "localhost" with my local IP.

@sjdrew
Copy link

sjdrew commented Mar 22, 2018

Same issue here.

Using WKWebView and PouchDB that requires authentication cookies, never works on Simulator. Switching to UIWebView then works ok on Simulator. Fine on real device.

Not sure if its related to this bug regarding simulator being case sensitive for headers:

https://stackoverflow.com/questions/44315389/ios-httpurlresponse-header-field-case-sensitivity

@DimitryDushkin
Copy link

@allanevargas
Copy link

@DimitryDushkin I don't quite understand on how to apply this fix.

I am working with Ionic1/AngularJS and have set up Android and iOS platforms via ionic/cordova commands.

@rafaellop
Copy link

Try this. Works without any plugins
CWBudde/cordova-plugin-wkwebview-inject-cookie#11 (comment)

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

6 participants