Google OAuth2: Asking for no information (empty scope)

匿名 (未验证) 提交于 2019-12-03 01:05:01

问题:

Is it possible to ask for no information when connecting with a google account with OAuth2 ?

I tried to pass an empty scope parameter but It won't work (Usual google error page).

Also, there is no list of the available parameters for scope...For now I use scope=email.

Edit: A list of scope parameters I finally found: https://developers.google.com/+/api/oauth

回答1:

Sorry, you cant.

As The OAuth 2.0 Authorization Framework says:

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.

And Google's implementation chooses the later one.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!