Error: Capacitor redirection to other domain/sub-domain with session storage

Hi Support Team,

I have converted my angular application to android application using Capacitor framework. But, I am facing some issues in doing some of the basic implementations. In this project, I have implemented a Single-Sign On(OpenId Connect) and initially it wasn’t working as it always open the login page on external browser but after that I am able to make it working. Now, I have multiple projects of angular that are merged into a single one and I need to redirect an application to another application(redirection to another domain/sub-domain) and I have white-listed all the domains by adding ‘allowNavigation’:[’*’] in my capacitor.config.ts file. Below are the problems I am facing currently:

  1. I am able to open the Single Sign On(Login Page) within application using ‘allowNavigation’ and after login the application is not able to get redirected as it is showing that webpage is not found. Please check the attached screenshot.
  2. I am able to open the in app browser window using capacitor’s browser plugin and successfully able to get redirected back to the application. For redirection to another application(other domain/sub-domain), I have added ‘allowNavigation’:[’*’] in my config file. Now, when I click on a button to get redirected to another application, it opens login page again as the app is not using the session storage.

Could you guys please help me in this as I am trying it from last week and not able to do it?

Thanks In Advance.

Are you using the @capacitor/browser plugin for your OAuth login? Or another plugin?

Yes I am using this ‘@capacitor/browser’.