-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 sharing between inAppBowser and with app #877
Comments
Hi guys, we are having the same requirement and face this issue as well on our side. Our EnvironmentCordova iOS 6.2.0 Our FlowWe have a button in our main cordova app (running WKWebView) which opens the cordova-plugin-inappbrowser.
This looks to me like a timing or async issue. I have no knowledge about native iOS Development, but could it be that the Cookie stores and their synchronization are handled somehow asynchronously by iOS now and we need a callback/promise approach here? We have tried many things to get around this issue but none of them resolved this behavior.:
Any help here is very much appreciated :-) |
I am also interested in resolution of this behaviour, same problem: cordova-ios: 6.0.0 The same works perfectly on ios <14.5 Some workaround until it's fixed, please ? Thanks |
Hi Demym, we could solve the problem on our side which might help you as well. You can use the WebView Proxy from @NiklasMerz here: When doing this you will need to use a custom scheme and custom hostname and need to convert all urls into "intrenal proxy URLs" (Example app://myApp/proxy/actualHttpURLURIEncoded/... ) with the function provided by the plugin: Big shoutout and thanks again to @NiklasMerz who solved this problem :-) Another solution is to use plugin https://github.com/CASTANA-Solutions/cordova-plugin-ios-xhr#readme I hope this helps you and anyone else which has to deal with these anyoing issues :-) cheers |
Thanks for the response Thorsten That was great, i installed the cordova-plugin-ios-xhr and magically now the app works correctly !! Thanks very very much. I imagine that when the inappbrowser will be updated i could remove the xhr plugin right ? Anyway, thanks once again for now |
Hi demym, This really made my day seeing that you could resolve the problem. That sounds really interesting. I don't know if its possible to get a cookie Sync built into the inAppBrowser. Maybe it could be worth asking this in the Have a great weekend! |
I've the same problem with WkWebView. |
I would suggest you try to add: That's the fork we use and also demym i think. I don't know if the cookie sync has also been introduced in the main plugin. I am only aware of the fork of CASTANA-Solutions. Kind regards |
Thanks for your answer, also adding this plugin cookies are not shared. Have i to add some specific preferences? |
hmm ok. are you using the br |
i'm opening inappbrowser with "_blank" on cloudflare authentication page, so i don't know if it is an ajax request. |
but what kind of requests are you performing on your main app? That is a difference i can tell you. In our case we are running the main app with file:// and use inappbrowser for login.microsoftonline.com as well as $.ajax calls in the main app. With this setup and https://github.com/CASTANA-Solutions/cordova-plugin-ios-xhr cookies are properly shared in our use case. br |
on my main app I call inappbrowser with cloudflare login to authenticate and set authentication cookies. |
Hi guys, I am wondering if anyone has a working solution for Azure / msal-browser login in a Cordova app for iOS. We're seeing a very stange issue, one described here: AzureAD/microsoft-authentication-library-for-js#4910 Is it something that should / can be fixed by Cordova / in the InAppBrowser or one (still) needs to resort to other plugins to circumvent one or another Apple/WKWebView constraint? |
Any solution for this problem |
Bug Report
Cookies are not sharing between inAppBowser and with app
Problem
I have a SSO login flow i am login in the
InAppBrowser
and sync the cookies with the appWkWebView
but not working inv 4.0.0
this issue iam observing after updatingcordova v 10
.tried follwoing
InAppBrowser v 5.0.0
as well.@zalaris/cordova-plugin-wkwebview-inject-cookie
What is expected to happen?
Need to sync the cookies between
InAppBowser
andWkWebView app
and vice versaWhat does actually happen?
Information
on
Command or Code
Environment, Platform, Device
iOS & Android
Version information
iOS version 14.4
cordova v 10.0
cordova-ios v6.1
Checklist
The text was updated successfully, but these errors were encountered: