我正在使用 allauth 应用程序。但是当我尝试使用 faceook 登录时,它向我显示错误 The parameter redirect_url is required 但我已经给了它一个重定向 url。 Error while logging in using facebook
登录密码
<div style="position:absolute;left:420px;top:118px;height:400px;width:200px;" id="login">
<form method="POST" action="">
{% csrf_token %}
<label style="position:absolute;left:60px;top:50px;color:red;">Username</label>
<p style="position:absolute;left:160px;top:43px;">{{ form.username }}</p>
<label style="position:absolute;left:64px;top:111px;color:red;">Password</label>
<p style="position:absolute;left:160px;top:103px;">{{ form.password }}</p>
<input style="position:absolute;left:210px;top:163px;height:36px;width:80px;background-color: #c52d2f;border-radius: 6px;color:white;" type="Submit" value="Login"/>
<a style="position:absolute;left:64px;top:171px;font-size:15px;font-weight:800;" href="{% url 'new' %}">Reset Password</a>
<a href="https://www.facebook.com/dialog/oauth?client_id={{ 198608780589573 }}&scope={{ scope }}&redirect_uri="{{ "http://127.0.0.1:8000/about_us" }}">Login using Facebook</a>
</form>
</div>
请您参考如下方法:
{{ var }} 是 Django 模板语言,用于将变量从 View 函数传递到您的 html。请将您的代码更改为此...
&redirect_uri=127.0.0.1:8000/about_us
