Omniauth+Devise+Facebook = 发生错误。请稍后重试

发布于 2024-12-25 06:23:41 字数 823 浏览 3 评论 0原文

我逐字遵循以下说明: https://github.com/plataformatec/devise/wiki/ OmniAuth:-概述

config/initializers/devise.rb:

require "omniauth-facebook"
config.omniauth :facebook, "xxx", "yyy", :scope => 'email,offline_access,read_stream', :display => 'popup'

“查看”链接有效,它要求我使用 Facebook 登录。但是,当单击它时,我收到“发生错误。请稍后再试。”。没有其他信息或错误。

在我的 Facebook 应用程序中,未设置“应用程序域”,并且站点 URL 设置为“localhost:3000”。

我的直觉告诉我该配置/回调有问题,但是 localhost:3000/users/auth/facebook/callback 工作正常。

提前致谢!

编辑:当我在登录拥有该应用程序的 Facebook 帐户时尝试登录时,它运行良好。当我尝试使用其他 Facebook 帐户时,会出现此错误。

编辑2:弄清楚了http://cl.ly/D6st

I followed these instructions verbatim: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview

config/initializers/devise.rb:

require "omniauth-facebook"
config.omniauth :facebook, "xxx", "yyy", :scope => 'email,offline_access,read_stream', :display => 'popup'

The View link works and it asks me to Sign In with Facebook. However, when clicking it, I get "An error occurred. Please try again later.". No other information or errors.

In my facebook app, 'app domain' is not set, and site URL is set to 'localhost:3000'.

My gut is telling me there is something wrong with that configuration/callback, however localhost:3000/users/auth/facebook/callback works fine.

Thanks in advance!

EDIT: When I try the login while logged in to the Facebook account that owns the app, it works perfectly. When I try with a different Facebook account, this error fires.

EDIT 2: Figured it out http://cl.ly/D6st

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回忆追雨的时光 2025-01-01 06:23:41

转到 Facebook 应用程序的设置,将沙箱设置为禁用

就这样。

Go to your facebook application's settings set sandboxto disable

Thats all.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文