Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't django-social-auth take into account the next variable when logging in?

If I'm going directly to a page (which requires a user to be logged in) without having logged in, Django's authentication framework takes me to the login page and then redirects to the page I had requested based on the value in the next variable.

However with django-social-auth is this not the case? I've implemented django-social-auth and I can see that the next variable in the URL is populated correctly. But when I finally login using Facebook, it re-directs me to the URL specified in the LOGIN_REDIRECT_URL variable.

Any idea where I'm going wrong?

like image 854
Arpit Rai Avatar asked Dec 12 '22 01:12

Arpit Rai


1 Answers

how is the code of your template? You put the url call as follows:

{% url socialauth_begin 'facebook' %}{% if request.GET.next %}?next={{ request.GET.next }}{% endif %}
like image 122
Gileno Filho Avatar answered May 03 '23 11:05

Gileno Filho