<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00008j8b9sSAAOkta Classic EngineAdministrationAnswered2024-04-16T10:03:02.000Z2020-06-18T18:33:23.000Z2020-07-10T21:01:58.000Z

ka0i1 (ka0i1) asked a question.

How to fix CORS issue when using capacitor for an ios app?

I have a web application build with angular 9. It is already integrated with the okta widget and working just fine.

 

Now I am trying to embed this application into a mobile app.

On the Android platform, I have been able to add the origin into the trusted origins and now the login is working fine too.

I tried on ios and it gives a CORS error saying capacitor://localhost is not in the trusted origins, I tried to add using the same method then for Android but the Okta admin system refuses it saying "Origin value is not valid".

 

How can I workaround this issue?

 


  • ka0i1 (ka0i1)

    Thank you, but this is not answering my question. This tutorial does not explain how to configure the okta service to accept request from ios apps.

    The authorization is working just fine on Android.

    My issue with ios app is that it won't accept http(s) as a scheme while okta seems to accept only http(s).

    is there any way to make these 2 work together?

    Expand Post
  • e80ay (e80ay)

    So, I'm struggling to do something similar right now with a react app and capacitor. The last I was able to get details, okta would not be supporting the capacitor scheme. However, there is a new capacitor plugin here that allows native requests: https://github.com/capacitor-community/http

    That said, I'm blocked myself with the redirect, which opens up safari to complete the authentication flow. Hoping I can find a way around this.

    Expand Post
This question is closed.
Loading
How to fix CORS issue when using capacitor for an ios app?