尝试将 OAuth 与 Chrome 自定义选项卡一起使用时获取 ERR_UNKNOWN_URL_SCHEME

Getting ERR_UNKNOWN_URL_SCHEME when trying to use OAuth with a Chrome Custom Tab

我正在构建一个利用 Digital Ocean API 的 Android 应用程序。为了进行身份验证,该应用程序打开一个 Chrome 自定义选项卡到 Digital Ocean OAuth 页面。我将我的重定向 URI 设置为 myapp://authorize/ 并在我的 Android 清单中注册了以下内容:

    <intent-filter>
                <data
                    android:host="authorize"
                    android:scheme="myapp" />

                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>

在 Digital Ocean 重定向到我的 url (myapp://authorize/?code=accesstokenhere) 后,自定义选项卡给我 ERR_UNKNOWN_URL_SCHEME.

但是,URL 在模拟器的浏览器应用程序中工作得很好。

确认@Jejefcgb 所说的,此问题已在 Chrome 的最新版本中修复。