【发布时间】:2016-01-21 18:43:48
【问题描述】:
我正在使用 django-allauth 和一个测试 Facebook 来测试身份验证。当我转到http://localhost/accounts/facebook/login 时出现以下错误:
Given URL is not whitelisted in Client OAuth Settings: This redirect
failed because the redirect URI is not whitelisted in the app’s Client
OAuth Settings. Make sure Client and Web OAuth Login are on and add all
your app domains as Valid OAuth Redirect URIs.
为什么会出现此错误,我该如何解决?
编辑:在设置 > 高级中,我在有效的 OAuth 重定向 URL 字段中设置了 http://localhost:8000/。
【问题讨论】:
-
设置 -> 高级
-
@CBroe :很抱歉,您是要我显示高级设置的屏幕截图吗?
-
不,我说这是
Valid OAuth Redirect URIs输入字段所在的位置……(如果您只是费心环顾四周,您可能已经自己发现了a一点点在问之前......?) -
@CBroe :我知道它在哪里。我用更多细节更新了问题。
-
不是一切之后,而是直到next参数开始。如前所述,URL 编码必须颠倒。
标签: django facebook django-allauth