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.).
1条答案
按热度按时间xmq68pz91#
我最近在Android上遇到了这样的问题,Android 12上的应用程序重定向失败,用户被锁定在一个白色屏幕上,我们通常在URL中获得令牌,并在应用程序中重定向。
在我的情况下,这是相关的:https://developer.android.com/training/app-links/verify-site-associations?authuser=2
chrome浏览器尝试检查此文件以验证应用的哈希值以执行重定向,但由于内部网络配置,该文件不可用,因此被锁定。此检查似乎仅在Android 12上附加,并且需要在用户设备上重新安装应用(是否在应用浏览器中缓存?)。
希望这能帮上忙。(离子6电容器)