# Cordova iOS UNSUPPORTED\_BROWSER\_ERROR

**URL:** <https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295>\
**Category:** Questions\
**Created:** [February 23, 2018, 7:37pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295 "2018-02-23T19:37:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarbot](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/jarbot/32/363_2.png) [@jarbot](https://devforum.okta.com/u/jarbot)\
**Post date:** [February 23, 2018, 7:37pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/1 "2018-02-23T19:37:12Z")

</div>

I’m building a React.js hybrid app with the Okta login react widget. I’m wrapping the React.js SPA with Cordova.

It’s working fine in a desktop browser but when I deploy to an iOS device I get the following error when attempting to login:

2018-02-23 11:17:26.749707-0800 PartnerTap[4897:2583852] login error: UNSUPPORTED\_BROWSER\_ERROR: There was an error sending the request - have you enabled CORS?

I don’t have any issue hitting out own REST api from the app. Any ideas?

I will add some more debugging to see why the browser check is failing.

Thanks,  
Jared

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [February 23, 2018, 7:46pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/2 "2018-02-23T19:46:52Z")

</div>

If you can get the actual CORS error, you will be able to whitelist in Okta. The Authentication API that the widget uses sends CORS headers:

[https://developer.okta.com/docs/api/getting\_started/enabling\_cors.html](https://developer.okta.com/docs/api/getting_started/enabling_cors.html)

---

<div class="post-metadata">

**Author:** ![jarbot](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/jarbot/32/363_2.png) [@jarbot](https://devforum.okta.com/u/jarbot)\
**Post date:** [February 23, 2018, 8:29pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/3 "2018-02-23T20:29:36Z")

</div>

Thanks for the quick reply. Can I set a wild card origin? I’m pretty sure cordova origin is something crazy like file://foobar

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [February 23, 2018, 9:00pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/4 "2018-02-23T21:00:11Z")

</div>

I think Cordova sends `file://`. You could try using it’s inApp browser like I did in this post on Ionic (which also uses Cordova). [https://developer.okta.com/blog/2017/08/22/build-an-ionic-app-with-user-authentication](https://developer.okta.com/blog/2017/08/22/build-an-ionic-app-with-user-authentication)

---

<div class="post-metadata">

**Author:** ![jarbot](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/jarbot/32/363_2.png) [@jarbot](https://devforum.okta.com/u/jarbot)\
**Post date:** [October 3, 2018, 9:16pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/5 "2018-10-03T21:16:36Z")

</div>

Will Cordova or Ionics origin: file:// ever be supported by Okta? I would really like to use the **[okta-signin-widget](https://github.com/okta/okta-signin-widget)** for all platforms rather than redirecting using the in-app browser.

---

<div class="post-metadata">

**Author:** ![jarbot](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/jarbot/32/363_2.png) [@jarbot](https://devforum.okta.com/u/jarbot)\
**Post date:** [October 4, 2018, 2:14pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/6 "2018-10-04T14:14:47Z")

</div>

I noticed Auth0 supports Cordova and Ionic [https://auth0.com/docs/quickstart/native/cordova/01-login](https://auth0.com/docs/quickstart/native/cordova/01-login). They allow the white listing of file://\*

---

<div class="post-metadata">

**Author:** ![whodeee](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/whodeee/32/1503_2.png) [@whodeee](https://devforum.okta.com/u/whodeee)\
**Post date:** [December 4, 2019, 9:51pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/7 "2019-12-04T21:51:45Z")

</div>

@jarbot did you ever get this figured out? I am looking into the same thing.

---

<div class="post-metadata">

**Author:** ![jarbot](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/jarbot/32/363_2.png) [@jarbot](https://devforum.okta.com/u/jarbot)\
**Post date:** [December 5, 2019, 1:12am UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/8 "2019-12-05T01:12:51Z")

</div>

@whodeee I’m not aware of any changes to the Okta platform that allows the use of their widget in Cordova apps, which is unfortunate. I used the dirty in-app browser hack to handle retrieving the tokens after login.

---

<div class="post-metadata">

**Author:** ![whodeee](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/whodeee/32/1503_2.png) [@whodeee](https://devforum.okta.com/u/whodeee)\
**Post date:** [December 5, 2019, 3:36pm UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/9 "2019-12-05T15:36:47Z")

</div>

@jarbot can you expand on that a bit? I am trying to work through the in-app browser and I think I am running into redirectUri issues. Can you post what your solution was at all?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 18, 2024, 12:38am UTC](https://devforum.okta.com/t/cordova-ios-unsupported-browser-error/1295/10 "2024-01-18T00:38:22Z")

</div>

Closed on January 18, 2024, 12:38am UTC


