After I choose some view with the decorator login_required() the user is redirected to: http://example.com/login/?next=/anuncio/adicionar/, right?
But, after I use "Login with facebook", the user are redirected to http://example.com/login/#= instead of http://example.com/anuncio/adicionar/
It happens only if I use the python-social-auth, and not happens if I use the auth native login.
My registration/login.html - Python Social Auth link
<a class="btn btn-social btn-fw btn-lg btn-facebook" href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}"><i class="fa fa-facebook"></i> Fazer login com Facebook</a>
and my Auth native login
<form action="{% url "auth:login" %}" role="form" method="POST">{% csrf_token %}
Add login redirect url to your settins.py file
LOGIN_REDIRECT_URL = '/anuncio/adicionar/'
so when user is authenticated it will tedirect the above url
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With