身份验证失败并显示

身份验证失败并显示

本文介绍了Google Fit O 身份验证失败并显示 RESULT_CANCELED 而不显示权限页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个 android 项目,它从应用程序用户的 Google Fit 个人资料中读取某些数据.我遇到了一个奇怪的场景,如下所示.以下所有内容均处于调试模式,而非发布模式.

Hi I have a android project where it reads certain data from application user's Google Fit profile. I faced a weird scenario as below. all the below are in debug mode and not in release mode.

1) 从我自己的笔记本电脑编译时,oAuth 在我的手机上成功运行,工作流程正常.

1) when compiled from my own laptop oAuth successfully worked on my phone and workflow is working fine.

2) 在其他开发者的机器上编译相同的代码时,选择要使用的账号后,没有显示需要给google fit授予权限的权限页面和受保护的void onActivityResult(int requestCode, int resultCode), Intent data) 方法被调用,结果代码为RESULT_CANCELED".多次尝试,结果相同

2) when same code is compiled from another developer's machine, after selecting the account to be used, it does not show the permission page where we need to grant permission to google fit and the protected void onActivityResult(int requestCode, int resultCode, Intent data) method is called with result code of "RESULT_CANCELED". tried numerous times with same results

3) 我从笔记本电脑上插入了同一部手机并推送了相同的代码.这次它显示了他手机中的权限页面,一旦批准,整个流程就可以正常工作了.

3) I plugged the same phone from my laptop and pushed the same code. this time it showed the permission page in his phone and once approved, complete flow works fine.

4) 然后我们卸载了应用程序并推送了从其他开发人员的笔记本电脑编译的 apk,现在 OAuth 工作正常并且流程正常工作,因为该应用程序的 google 配置文件已授予权限.

4) then we uninstalled the app and pushed the apk compiled from the other dev's laptop and now the OAuth works fine and flow is working without issue because the permission is already granted on the google profile for the application.

这个问题似乎很奇怪,任何解决方向都将不胜感激.

the issue seems weird and any direction to solving would be appreciated.

推荐答案

在我们的案例中,此问题的原因似乎是密钥库不正确.对于调试,我们没有在每个密钥库中使用通用密钥库,一旦我们使用了一个密钥库并将其注册到开发者控制台中,这个问题就解决了.

It seems the reason for this issue in our case is Incorrect keystores. for debug we did not used common keystores across every one and once we used one key store and register it in developer console this issue was resolved.

这篇关于Google Fit O 身份验证失败并显示 RESULT_CANCELED 而不显示权限页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 07:10