AppAuth Android https 方案 - 与 Firefox 和其他浏览器一起使用?

AppAuth Android https scheme - work with Firefox and other browser?

我想知道使用 https 方案的 AppAuth 是否适用于 Firefox 和其他浏览器。

我有一个 CAS 5.2 作为 OAuth Idp,但 idp 不是问题所以我不会 post 这里的设置。

我正在尝试制作一个可以与我的 Idp 一起使用的演示 AppAuth 应用程序,我正在使用 https://github.com/openid/AppAuth-Android 中的演示进行设置。

我正在使用 https redirect_uri 架构,因为此 OAuth Idp 不仅适用于移动设备。

问题是,我只能使 OAuth 在 Chrome(和自定义选项卡版本)和 Samsung 浏览器[=40 中工作=](和自定义选项卡版本)。

对于我测试过的其他浏览器(Opera、Dophin、Firefox),我只是盯着我的 redirect_uri 并拒绝返回应用程序 [ https://www.example.net/test_oauth/index.php ](注意:我已提示用户单击 link 进行重定向)

我希望它不仅可以 Chrome 和 Samsung 浏览器工作,如果它可以与 Firefox Custom Tab 等一起工作,那就太棒了!

设置与AppAuth Demo基本相同,只是强制一个client secret(用于测试目的),以及以下配置

auth_config.json:

{
  "client_id": "TestOAuth",
  "redirect_uri": "https://www.example.net/test_oauth/index.php",
  "authorization_scope": "openid email profile",
  "discovery_uri": "",
  "authorization_endpoint_uri": "https://www.example.net/cas/oauth2.0/authorize",
  "token_endpoint_uri": "https://www.example.net/cas/oauth2.0/accessToken",
  "registration_endpoint_uri": "",
  "user_info_endpoint_uri": "https://www.example.net/cas/oauth2.0/profile",
  "https_required": false
}

AndroidManifest.xml

  <activity android:name="net.openid.appauth.RedirectUriReceiverActivity">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

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

            <data
                android:host="www.example.net"
                android:path="/test_oauth/index.php"
                android:scheme="https" />
        </intent-filter>
    </activity>

谢谢!

这里是 AppAuth 的主要维护者。据我所知,Firefox 和其他基于 non-Chromium 的浏览器未实现 app links,因此不会尝试将匹配的 Web URL 分派给声明它们的应用程序。出于这个原因,如果您必须为授权流程使用 Web 重定向 URL,那么我建议设置一个真实的网页来捕获重定向,并将其转换为附加到按钮或 link 的基于自定义方案的 URI。