Facebook 身份验证陷入生产困境 - 在 EC2 中使用 Rails 2.3.11omniauth 1.0.2
对于我的 Rails 2.3.11 应用程序,我在我的开发环境(Ubuntu 盒子)中使用了基于 Omniauth 的 facebook 身份验证。效果很好。然而在生产中它只是坐在那里。
最终我相信它因超时而失败。我相信它未能处理来自 Facebook 的回调: =">http://ziptrips.in:8002/auth/facebook/callback?code=AQA7cFWwM4Yrvm3dlREWv8-sdassasadas-9xkDVptqLfsl1Bevb 9w8dbbcl9sgCmYugkWycgbFjqxWZozuiLAOzAJ1WxAde8T2DpRpJmYBXSNT4NtgGOup2O2XDmiYlEzAGSePEMeMjqvRX2oUCqHw#=
由于我的是 Rails 2.3.11 应用程序,因此初始化程序中的omniauth.rb 如下所示: ActionController::Dispatcher.middleware.use OmniAuth::Builder #如果您使用的是 Rails 2.3.x 提供商:facebook,'1234123343','6aec22dssadsaetcetc',:client_options => {:ssl => {:ca_path =>; “/etc/ssl/certs”}},:范围=>; '电子邮件、离线访问、读取流' 结束
相关信息如下: Omniauth 宝石:1.0.2 omniauth-facebook gem:1.2.0 托管在 EC2 中
您可以在这里尝试:http://ziptrips.in/auth/facebook 我已确保 Facebook 设置正确。
非常感谢任何帮助/指示。
谢谢, 纳夫尼特
For my Rails 2.3.11 app, I've Omniauth based facebook authentication working in my development environment- Ubuntu box. That works perfectly. However in production it just sits there.
Ultimately I believe it fails because of timeout. I believe its failing in handling the callback from facebook: =">http://ziptrips.in:8002/auth/facebook/callback?code=AQA7cFWwM4Yrvm3dlREWv8-sdassasadas-9xkDVptqLfsl1Bevb9w8dbbcl9sgCmYugkWycgbFjqxWZozuiLAOzAJ1WxAde8T2DpRpJmYBXSNT4NtgGOup2O2XDmiYlEzAGSePEMeMjqvRX2oUCqHw#=
Since mine is a Rails 2.3.11 app, here's how my omniauth.rb in initializers looks like:
ActionController::Dispatcher.middleware.use OmniAuth::Builder do #if you are using rails 2.3.x
provider :facebook, '1234123343', '6aec22dssadsaetcetc', :client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}, :scope => 'email,offline_access,read_stream'
end
Here's relevant info:
Omniauth Gem : 1.0.2
omniauth-facebook gem: 1.2.0
Hosted in EC2
You can try it here: http://ziptrips.in/auth/facebook
I've made sure that facebook settings are correct.
Any help / pointers are really appreciated.
Thanks,
Navneet
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论