2015-06-23 51 views
0

我在使用Google 2.0登录按钮here时发现了添加增量授权的文档。Google Cloud Endpoints是否支持增量认证?

但是,Google Cloud Endpoints使用记录为here的方法在流程中使用了非常不同的登录流程,并且设置了教程here

gapi.auth.authorize(Endpoints schema)和gapi.auth2.init方法看起来有很大不同。然而,gapi.auth2.init方法具有实现增量授权的文档化手段。使用内置身份验证架构时,Google Cloud Endpoints可以实现这一点吗?

回答

1

无论您使用哪种验证方法(gapi.authgapi.auth2),JS客户端库都会处理对您的Google Cloud端点的呼叫的身份验证。因此,只要您通过gapi.client.yourApi方法调用端点,所有内容都应该可以工作。

唯一重要的是,在调用需要验证的方法之前,email范围已被授权,因为Google Cloud Endpoints需要访问用户的电子邮件地址。

+0

还没有得到实施,但这是我正在寻找的信息。 –

+0

完美工作。只需遵循https://developers.google.com/identity/sign-in/web/sign-in。 –

相关问题