Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10588

Cordova InAppBrowser delay in passing cookies on iOS 9.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • Ionic mobile app accessing a Drupal website

    Description

      We are building an app using the cordova in-app browser as part of our authentication flow. We are seeing a problem with cookies not being passed by cordova on iOS 9.2 and later. We are using the Ionic platform for the app. Here is a detailed description:

      We login users to the app by opening a login url (OKTA SSO login for the company) in the Cordova in-app browser plugin.

      This renders the OKTA SAML template and allows the user to enter the credentials.

      Upon do-login action, the in-app browser follows all the redirects and eventually on a successful Authentication renders the Drupal site from which we get content for the app.

      At this point, we have the required cookie attached to the response to move forward and make direct API calls from the ionic application to the Drupal Resource API ( we do close the in-app browser once we load the Drupal site in the in-app browser).

      This solution works perfectly on android and pre ios 9.2 devices.

      With ios 9.2, there is a delayed hand-off of the cookies to the ionic webview once we close the in-app browser. I tried leaving the in-app browser open and i can access all the authenticated resources properly within the in-app browser right away without any delay, once the authentication is complete. So there is no issue withe the OKTA SSO flow or the cookie. There seems to be an issue with the cookie getting attached to the ionic webview from the in-app browser plugin.

      On a average, it takes about a minute for the cookie to show up and we can then make API calls to Drupal. ( We keep calling Drupal API and on getting 403, we redirect to this same login flow and this continues for a while, until the cookie is available and the API call goes through successfully.)

      Is there a way to get the cookie attached to the ionic webview from the in-app browser plugin without encountering this delay?

      Attachments

        Issue Links

          Activity

            People

              jcesarmobile jcesarmobile
              Sarah Impekable Sarah Tressel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: