我正在使用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重定向网址字段中设置了http://localhost:8000/。
答案 0 :(得分:2)
检查登录对话框网址中redirect_uri
参数的值 - 该值必须设置为Valid OAuth Redirect URI
。
(当将值放入登录对话框URL时应用的URL编码当然必须颠倒。)