Saturday, June 13, 2026
HomeiOS DevelopmentIonic 6 angular capacitor set cookies on ios

Ionic 6 angular capacitor set cookies on ios

[ad_1]

i’ve a ionic 6 app with angular and i am utilizing exterior APIs to login person and retrieve some knowledge.

When the person authenticates, the server responds with a Set-cookie header; every thing works superb each on browser and android software.

On iOS seems just like the set-cookie header obtained within the response is doing nothing.

I am attempting additionally to make use of cordova-plugin-wkwebview-inject-cookie on my app.element.ts:

this.platform.prepared().then(() => {
  if (this.platform.is('ios')) {
    wkWebView.injectCookie(setting.config.baseUrl, "https://stackoverflow.com/");
  }
});

however the cookie isn’t saved, so each subsequent request get 401 response:

enter image description here

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments