鉴于URL未在客户端OAuth设置中列入白名单:为什么我收到此错误?

时间:2016-01-21 18:43:49

标签: django facebook django-allauth

我正在使用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.

我在Facebook上的应用设置目前如下所示: enter image description here

为什么我收到此错误以及如何解决此问题?

编辑:在设置>高级,我在有效的OAuth重定向网址字段中设置了http://localhost:8000/

1 个答案:

答案 0 :(得分:2)

检查登录对话框网址中redirect_uri参数的值 - 该值必须设置为Valid OAuth Redirect URI

(当将值放入登录对话框URL时应用的URL编码当然必须颠倒。)