Okta Integration in Ionic App

Hi All,
I am trying to integrate Okta in my ionic app. but when i run the application and try to call the method createAndSaveNonce of okta service i am getting following error. Please can any one help me.

Failed to load https://dev-202191.oktapreview.com/api/v1/authn: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8100’ is therefore not allowed access.

I had to use Cordova’s in-app browser to make my Ionic app work with Okta. Details at https://developer.okta.com/blog/2017/08/22/build-an-ionic-app-with-user-authentication

I am seeing the same issue with CORS as described above. I also tested using your example without any luck. Please see attached images.

An here is a proof that I used your code…

A closer look shows there is an additional CORS setting on the security tab -> API -> CORS. See it scotch.io

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.