I'm using python social auth to use social logins but I'm unable to redirect to the last page after successful login.
For instance if I'm on the following page http://localhost:8000/docprofile/14/
and click the login button, instead of redirecting me to the last page http://localhost:8000/docprofile/14/
it redirects me to the login page.
If I put this:
<a href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}"> | Login with Facebook</a>
It redirects to the login page and the url ends with strange characters:
http://localhost:8000/login/#_=_
I also tried this:
<a href="{% url 'social:begin' 'facebook' %}?next={{ request.get_full_path }}"> | Login with Facebook</a>
This time it does take the path of the /docprofile/14
but still doesn't redirect me back and takes me to the login page with the url http://localhost:8000/login/?next=/docprofile/14/#_=_