11

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.

Community
  • 1
  • 1
cyber_dave
  • 2,019
  • 1
  • 16
  • 21

2 Answers2

5

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.

cyber_dave
  • 2,019
  • 1
  • 16
  • 21
1

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.

Mark Hillard
  • 202
  • 3
  • 9
  • 2
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/10818973) – Drenmi Jan 08 '16 at 13:03
  • 1
    I was just trying to help. I'll remember that for the future, but if this post is deleted then the person who originally asked the question may no longer have a possible solution to his problem. – Mark Hillard Jan 08 '16 at 15:48