Omniauth 雅虎错误:OAuth::未经授权:401 禁止
对于我们的生产应用程序,我们在 yahoo 帐户上设置了 API。我们得到消费者密钥和消费者秘密。
当用户点击访问 yahoo 的联系人时,我们收到 401 Forbidden 错误。 Omniauth 适用于其他提供商,也适用于分期。它不适用于生产。谁能知道我们缺少什么?
For our production application, we set up API on yahoo account. We get consumer key and consumer secret.
When user click to access contacts from yahoo, we get 401 Forbidden error.
Omniauth works well for other providers and also works well on staging. It does not work on production. Could anyone know what we are missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了这个问题。是因为我们注册的方式不对。
我们在登台上创建了一个 html 页面来进行验证。我们在暂存站点上进行了测试。
核实后我们拿到了钥匙。我们使用该密钥进行生产。
我们遇到了类似
To get yahoo api for production, you have to test in production site direct 的错误。
以下是您必须执行的步骤:(如何为 OAuth 注册 yahoo)
访问http://developer.yahoo.com/forum/OAuth/consumer-key-rejected/1258200961000-7a8c4082-46eb-3312-9632-a46af8734ad7
之后我们仍然遇到错误。
这可能是因为我们的雅虎设置中的许可。
设置可能会遗漏一些东西。它可能不包括社交目录下的个人资料。
因此我们的应用程序无法访问用户的个人资料和 401 禁止加注。
要了解 OAuth 错误代码:
请访问:http://wiki.oauth.net/w/page /12238543/问题报告
I solved the problem. It is because the way we register was wrong.
We created a html page on staging to verify. We tested on staging site.
We got a key after we verified. We used that key for production.
We got error like
To get yahoo api for production, you have to test in production site directly.
Here are steps you have to do: (How to register yahoo for OAuth)
Visit http://developer.yahoo.com/forum/OAuth/consumer-key-rejected/1258200961000-7a8c4082-46eb-3312-9632-a46af8734ad7
After that we still got error.
It may be because of permission in our yahoo setting.
The setting may miss something. It may not include Profiles which is under Social Directory.
So our app cannot access user's profile and 401 forbidden raise.
To understand OAuth errors codes:
Visit: http://wiki.oauth.net/w/page/12238543/ProblemReporting