Facebook 认证推荐和 OmniAuth
考虑到 Facebook 的授权代码,是否可以调用或实例化 OmniAuth?使用经过身份验证的引用 Facebook 会将 ?code=ABC...
附加到 URL。
Facebook文档指出,收到授权代码后,应该请求访问令牌,但是在浏览omniauth-facebook gem时,此代码似乎已经存在(第 64 行)。
我想要与 OmniAuth 集成的原因是为了避免为了让经过身份验证的引荐工作而重复代码。谢谢!
Is it possible to call or instantiate OmniAuth given that a authorization code for Facebook? Using authenticated referalls Facebook will append a ?code=ABC...
to the URL.
Facebook documentation states that after receiving the authorization code one should then request the access token, however upon browsing through the omniauth-facebook gem this code already seems to exist (line 64).
My reason for wanting to integrate with OmniAuth is to avoid duplicating the code just to get authenticated referrals working. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看此内容后,有两个立即可用的选项:
重定向到 Facebook OAuth 路径。
使用传入的代码手动从 Facebook 获取所有 OAuth 信息。
下面是一些在给定代码的情况下执行某些 OAuth 步骤的代码。
After looking into this two immediate options are available:
Redirect to the Facebook OAuth path.
Use the passsed in code to manually grab all the OAuth info from Facebook.
Here was some code that does some of the OAuth steps given a code.
仅供参考,经过身份验证的推荐已被弃用,并将于 2013 年 2 月删除 – https://developers.facebook。 com/roadmap/#february-2013
FYI, Authenticated Referrals are deprecated and will be removed in February 2013 – https://developers.facebook.com/roadmap/#february-2013
omniauth-facebook 已经为遇到此线程的任何人实现了此功能。
omniauth-facebook has implemented this, for anyone that comes across this thread.