我正在使用 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 必须具有自定义方案,否则应用程序的 Intent 将不会启动。
尝试像 strava://callback 或 sample://example 这样的 URI。
此外,请确保 Intent 中定义的 URI 与使用的 redirect_uri 参数以及注册到您的应用的参数相匹配。
关于java - Chrome 自定义标签 Oauth2 流程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35217392/