iOS cookies
Hi, I am using this plugin(capacitor-community-http) in a framework7 application with capacitorJs and Vuejs. For the API I am using Laravel Sanctum (all this in local host). I am trying to use the cookie authentication which first call the endpoint /sanctum/csrf-cookie, the answer should run the Set-Cookie and store the csrf token as a cookie on the browser. On the web everything works as expected saving the cookies but on IOS for some reason is not saving the cookies so my future requests don’t include the csrf token and can’t access the api.
I have tried to include the domain in the info.plist, adding the webfetch include credentials, changing host name in the config, etc. I have tried a lot so far but can’t get it to work.
Does someone have an example of how they achieve this or have any idea why it might not be working on IOS ?
Hello, I have the same problem with Ionic (Angular, Capacitor). It works on Android but not on IOS.
Someone has a workaround ? Thanks
Also having trouble getting cookies working. Any solutions here?
Same here, using Ionic (Vuejs, Capacitor) and JWT Auth. It's working with Firefox ionic serve but not on iOs inside app. I get an obsolete Token 401 error.
@mikmikmik for the most part I got cookies working with making a few changes to my headers and calling get/set cookie probably more than needed. Can check out my SO post here.
https://stackoverflow.com/questions/72045698/capacitor-ios-using-cookie-based-auth
@billpull thanks I'll have a look. My problem is a bit different it's about the refresh_token cookie.