Google OAuth2:不要求任何信息(空范围) [英] Google OAuth2: Asking for no information (empty scope)
问题描述
使用OAuth2连接到Google帐户时是否可以不要求任何信息?
我试图传递一个空的scope
参数,但是它不起作用(通常是Google错误页面).
I tried to pass an empty scope
parameter but It won't work (Usual google error page).
此外,没有scope
可用参数的列表...暂时使用scope=email
.
Also, there is no list of the available parameters for scope
...For now I use scope=email
.
我终于找到了范围参数列表: https://developers.google.com /+/api/oauth
A list of scope parameters I finally found: https://developers.google.com/+/api/oauth
推荐答案
对不起,您不能.
如果客户端在请求授权时忽略了scope参数,则授权服务器务必使用预定义的默认值处理请求,或者使请求失败 指示无效的范围.
If the client omits the scope parameter when requesting authorization, the authorization server MUST either process the request using a pre-defined default value or fail the request indicating an invalid scope.
然后Google的实现选择第二个.
And Google's implementation chooses the later one.
这篇关于Google OAuth2:不要求任何信息(空范围)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!