[Fixed]-Django custom login form HttpResponseRedirect not working

1👍

You need to extract the mail and password from the form, before doing the authentication, otherwise both values will be “”.
This can be done the following way:

email = form.cleaned_data['email']
password = form.cleaned_data['password']
user = authenticate(email=email, password=password)

Leave a comment