0

I have an OAuths flow (code grant, native app) that works like so:

  1. User opens a native app and clicks on a login button in it
  2. User's Default web browser is lunched and navigates to www.domain1.com/authorize
  3. User is redirected (302) to a login page at www.domain1.com/login.html (a react page)
  4. User enters his credentials and submits
  5. Login page calls www.domain1.com/login on submit
  6. If the credentials are correct then the login page gets a redirect (302) to com.mycompany.app://callback as a response to the call to www.domain1.com/login
  7. Browser follows redirect (302) to com.mycompany.app://callback

Now, I expected the native app associated with the private URI scheme com.mycompany.app://callback to get the callback and open. However, what actually happens is that the browser returns an error (this one is in chrome, in Firefox and Safari the message is a bit different but same meaning):

Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted

I saw a not-so-similar issues with trying to access a local file file:// but the situation I have is different. Also, I have no option to add 'http' or 'https' since this will cause the redirect to navigate to a web address and not to a local private URI.

Anyone know why is that? how can I get rid of the error and get the desired behavior?

Eyal Ringort
  • 601
  • 6
  • 19

0 Answers0