-
Notifications
You must be signed in to change notification settings - Fork 396
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
Secure and HttpOnly cookies setted by server not sent to subsequent http requests #616
Comments
Same problem here! |
Facing Same Problem with Plugin version 4.2.1. On every HTTP request, server is assigning new cookie in response. Which means cookie persistence issue. :( |
@Hanzofm are you also stuck here, or have found solution? |
Hi, I have found a temporary workaround changing the angular httpclient to https://github.com/silkimen/cordova-plugin-advanced-http plugin. It uses the ‘credentials’ if detect it automatically Also avoids CORS problems wich in my opinion are the main problem here |
Is someone of you using the cordova-plugin-wkwebview-inject-cookie plugin? Maybe that plugin is the cause of the issue and not the webview plugin --> CWBudde/cordova-plugin-wkwebview-inject-cookie#11 |
No In my case, I am not using this plugin |
@vorderpneu No, I'm also not using this plugin... |
I got this fixed via this https://github.com/CWBudde/cordova-plugin-wkwebview-inject-cookie plugin. I suggest you all to try it. Hope this gets fixed for all of us. This bug is not related to cordova-plugin-ionic-webview plugin, but its an issue with IOS Cookies Handling for WkWebView. Cookies are not synced for some devices only the first time, but for me it was not syncing forever. |
I am also facing the same issue. In subsequent request, safari is not sending the session cookie id so every time session gets renewed in the backend. I tried with https://github.com/CWBudde/cordova-plugin-wkwebview-inject-cookie but the issue is still the same. I was using [email protected] then I changed to [email protected] but the issue is still the same. Can you please suggest what to do? I am using ajax to communicate with the server. I have tried with many suggestions got from the web but no luck yet. I was testing in ios various simulators but for the devices it is same. Kindly help me on the same if you faced the same problem and resolved the issue. Thanks |
This is due to the way apple handles CORS cookies on wkwebview from iOS 14, they're discussing wether to implement an app bound domain list where this would be allowed in the app. https://bugs.webkit.org/show_bug.cgi?id=213510 As a hack, I am using https://github.com/GEDYSIntraWare/cordova-plugin-ionic-webview#custom to make this requests go through native layers, but if you have other plugins that do http requests (like cordova-plugin-file-transfer) make sure that those requests don't go through this proxy. |
I think this is the same issue I'm having upgrading to WKWebView for my ionic app. Close app out and start process over, everything works as expected. One fix is to grab the cookies and store them in local storage. This gets tricky because set-cookie header is not shown unless the requests allows it. Would prefer not to do that. |
As of March 2020, all third party cookies are blocked unconditionally and the third party needs to call the Storage Access API to ask for the user’s permission to use cookies. SameSite: None dosent work for macs |
Circling back around on this. I had things working with iOS 13. Apple rejected my app when it was run on iOS 14. Do I need to set up |
Different path. I was able to get App Bound from config.xml doing the following.
Looks like this shows up correctly in info.plist |
Try this. Works without any plugins |
https://github.com/silkimen/cordova-plugin-advanced-http plugin. this plugin can solve sent to subsequent http requests in my cordova project |
Hi,
I have an Ionic App with this specs:
My app make request to a SOAP backend which is secured with a HttpOnly secure cookie JSESSIONID (Tomcat server).
I have enabled CORS so that my requests are able to reach the backend, this is the Tomcat CORS filter:
When I do login against the backend the server SETS a cookie (JSESSION):
Set-Cookie: JSESSIONID=00000000....; Path=/; Secure; HttpOnly
Which it would be used to send in subsequent request to backend to authenticate in secured WS. This is the code to make request with httpclient angular(Same for subsequent request)
The problem is on iOS/safari , the subsequent request not sent the
Cookie
Header with the JSESSIONID value. On Android, chrome works fineA strange additional info:
¿What would be the problem? How can I fix this?
The text was updated successfully, but these errors were encountered: