我在 Android Studio 中设置了一些 Cloud Endpoints 并实现了一个 Authenticator (com.google.api.server.spi.config.Authenticator),每次调用云端点时都会调用它。
现在我想使用我的身份验证器通过 GiTkit(Google 身份工具包)检查来自 Android 的登录。当我调试我的端点时,我可以使用像http://localhost:8080/_ah/api/userApi/v1/login/这样的本地 URL 来检查它们。在 Android 模拟器中,本地环回地址为 10.0.2.2,因此 URL 为http://10.0.2.2:8080/_ah/api/userApi/v1/login/(在 Android 浏览器中运行)。
但我无法在 Google 开发人员控制台(Web 应用程序的客户端 ID)中将授权重定向 URI 形式 localhost 更改为此 URL。(无效重定向: http: //10.0.2.2 :8080/_ah/api/userApi/v1/login/必须以公共顶级域(如 .com 或 .org)结尾)
如何在 Android 模拟器(或手机)中调试我的 Cloud Endpoint 和 GiTkit?