Apparently, InAppBrowser does not store the current session cookie when using _blank on Android. Is there some setting that I'm missing in order to make this possible? It seems to work flawlessly on IOS and is mildly frustrating to troubleshoot. The cookie needs to be there for when the callback from oAuth happens and my server reads and assigns the current session the needed data.
What I have tried...
1) Adding CookieManager to android Childbrowser (old, I know)
2) target = _self will actually send the cookie to the server, but the popup that is opened closes the whole app (instead of the popup) after authentication and must be reopened manually
3) Changing various WebView properties and settings to no avail.
Upon delving further into my problem, I've found that the InAppBrowser utilizes normal webview while my app ran using Crosswalk webview, thus the two became disjointed as a result.
I solved this problem by removing Crosswalk, for now.
My project was using Ionic#1.3.11 w/ the Ionic Crosswalk browser if anyone is curious.
If anyone has a suggestion or work-around for the cookie issue in Crosswalk, it would be greatly appreciated.
It appears that Crosswalk prevents you from passing a cookie to the inAppBrowser on Android devices. After a ton of digging I found a forum discussion about the issue and a possible solution:
https://forum.ionicframework.com/t/crosswalk-and-inappbrowser/25139
https://github.com/Shoety/cordova-plugin-inappbrowserxwalk
Our team hasn't tested/implemented this yet, but it looks promising.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With