Chrome 自定义选项卡 Oauth2 流程

Chrome Custom Tabs Oauth2 Flow

我正在使用 chrome 自定义选项卡通过 strava 登录。 我能够授权该应用程序,但是 chrome 自定义标签在到达重定向时没有重定向回我的应用程序。

<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="sample.example.com"
       android:pathPrefix="/"
       android:scheme="http" />
</intent-filter>

当 chrome 自定义标签重定向 URI 时,如何重定向回应用程序?

据此:https://code.google.com/p/chromium/issues/detail?id=536037 URI 必须具有自定义方案,否则应用程序的意图将不会启动。

尝试像 strava://callback 或 sample://example 这样的 URI。

此外,请确保意图中定义的 URI 与使用的 redirect_uri 参数以及注册到您的应用的参数相匹配。

目前strava仅支持http[s]方案。
我认为只有 fitbit 支持从 chrome 自定义选项卡获取应用回调的自定义方案。