kristianhristov / cordova-cookie-master

MIT License
26 stars 113 forks source link

HTTPS support #2

Open nickcmaynard opened 8 years ago

nickcmaynard commented 8 years ago

Is this plugin expected to work for HTTPS endpoints? My preliminary testing seems to show it doesn't work...

kristianhristov commented 8 years ago

Hi Nick,

At this time there isn't support for HTTPS. I am planning to expand the functionality of this plugin, but I don't have enough time at the moment.

Feel free to submit a pull request if you want, and I'll be happy to add it.

Cheers!

nickcmaynard commented 8 years ago

I've only been playing with this on iOS, but I've had some success with hard-coding the "secure" attribute of the Cookie to true:

[cookieProperties setValue:@YES forKey:NSHTTPCookieSecure];

Android looks like a similar approach.

I'd guess this should be parameterised somehow.

Nothing near a pull request yet. I'll try to take a look next week.

schoettler commented 8 years ago

I am having an issue with getCookieValue for iOS, it returns an empty array. Currently using iOS 9.

The parameters are alright and the same code works on Android!

kristianhristov commented 8 years ago

The plugin has not been tested on iOS 9. I'll have to check if something in the native API has changed and update it. Unfortunately I'm quite busy these days so it'd probably take me a long time to come round to it.

If you are willing, you can submit an pull request with a fix for that and I will happily add it.

Thanks!

On 29 September 2015 at 12:30, Roberto von Schoettler < notifications@github.com> wrote:

I am having an issue with getCookieValue for iOS, it returns an empty array. Currently using iOS 9.

The parameters are alright and the same code works on Android!

— Reply to this email directly or view it on GitHub https://github.com/kristianhristov/cordova-cookie-master/issues/2#issuecomment-144129399 .

Kristian Hristov Web Developer http://kristianhristov.com/

schoettler commented 8 years ago

Works fine! Just needed to include the protocol, as https://www.domain.com

kristianhristov commented 8 years ago

Great :)

On 29 September 2015 at 15:35, Roberto von Schoettler < notifications@github.com> wrote:

Works fine! Just needed to include the protocol, as https://www.domain.com

— Reply to this email directly or view it on GitHub https://github.com/kristianhristov/cordova-cookie-master/issues/2#issuecomment-144184127 .

Kristian Hristov Web Developer http://kristianhristov.com/

schoettler commented 8 years ago

I created a fork to make it fit on my current project, basically just needed a method to clear all cookies at once: https://github.com/schoettler/cordova-cookie-master

kristianhristov commented 8 years ago

Sounds great, could you please create a pull request so I can merge your changes in the main project.

Thanks!

On 29 September 2015 at 15:45, Roberto von Schoettler < notifications@github.com> wrote:

I created a fork to make it fit on my current project, basically just needed a method to clear all cookies at once: https://github.com/schoettler/cordova-cookie-master

— Reply to this email directly or view it on GitHub https://github.com/kristianhristov/cordova-cookie-master/issues/2#issuecomment-144186564 .

Kristian Hristov Web Developer http://kristianhristov.com/

schoettler commented 8 years ago

Kristian, i have added a method to get all cookies from a domain in a JSON Object and set multiple cookies to a domain from JSON as well. I'm not an Objective C developer, so i may have done something wrong in the setCookies method which is not working, would you mind taking a look? https://github.com/schoettler/cordova-cookie-master

kristianhristov commented 8 years ago

Thanks for the heads up Roberto. Unfortunately I'm swamped right now, so I won't be able to take a look any time soon.

I'll get back to you as soon as I can.

Thanks!

On 6 October 2015 at 11:51, Roberto von Schoettler <notifications@github.com

wrote:

Kristian, i have added a method to get all cookies from a domain in a JSON Object and set multiple cookies to a domain from JSON as well. I'm not an Objective C developer, so i may have done something wrong in the setCookies method which is not working, would you mind taking a look? https://github.com/schoettler/cordova-cookie-master

— Reply to this email directly or view it on GitHub https://github.com/kristianhristov/cordova-cookie-master/issues/2#issuecomment-145925576 .

Kristian Hristov Web Developer http://kristianhristov.com/

schoettler commented 8 years ago

Nevermind ~

I was missing the cookie value in the cookie properties dictionary, newbie mistake.

graphefruit commented 8 years ago

Any update on this? Would bei awesome to see this on https