Capacitor "Browser Plugin" issues with Redirects

The Capacitor Browser is having issues with web redirects - with different behaviors in iOS and Android. I think this is a very buggy plugin, but maybe I’m missing something…

My Ionic app uses the Capacitor Browser plugin to present a Federation Login page. There is an “authentication URL” returned upon successful SSO login - or if the user is already logged in then there is an immediate “authentication URL” redirect.

Here’s what I am seeing…

iOS: for a first time login, the web redirect works and deep links back into my app – no problem here. However, if SSO is active, then there is an immediate redirect which the Browser ignores. I can see the URL change, and it works if I open it in a separate mobile web browser.

Android: for a first time login, the web redirect is ignored and the user is left stuck in the browser. Again, if I copy the URL to a separate web browser then it deep links back into the app.

Has anyone done this successfully or have any workarounds? I’ve tried the “Cordova” and “Awesome” InAppBrowser versions of this plugin, and they don’t redirect at all (although they have a bit more control over closing the browser, etc.).