限制应用程序使用 OAuth 登录到一个域(例如 abc.com)。
通过以下步骤获取错误:
这样做时会发生以下错误:
OAuth 2 parameters can only have a single value: hd
在错误堆栈跟踪客户端 ID 是可见的。那是安全风险吗?
如何修复此错误?
最佳答案
根据 documentation the hd parameter用于 G Suite,因此您可能会重复 hd 参数,其中一个带有 hd=*
另一个与您的托管域。还指出您不应依赖此 UI 优化来控制对您的应用程序的访问。
In the error stack trace client id is visible. Is that a security risk?
没有。 It is not a secret .它用于调试目的。
How can this error be fixed?
尝试替换参数
hd
而不是添加一个新的。通常,这应该对您的请求的每个参数进行。还有 OAuth2 documentation声明 invalid_request
重复参数时出错。
关于security - 错误 : OAuth 2 parameters can only have a single value: hd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16058300/