3

Hello and thank you for your time.

Situation:

I'm using allauth in my Django Project

  • User is on some random page (call it first page) of my site
  • He clicked on Facebook icon and call href="/accounts/facebook/login/?process=login"
  • He sign up with his Facebook account
  • He redirected to LOGIN_REDIRECT_URL = 'some_page', from settings.py

I need redirect him back to the first page. Is it a way of how i can do it?

Sergey Bakotin
  • 373
  • 1
  • 3
  • 15
  • 1
    `django-allauth` is using django's [login_redirect_url](https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-LOGIN_REDIRECT_URL), so just adjust that to your wanted redirect address – copser Jul 20 '17 at 03:48
  • 1
    @Selcuk your page is not there but I think you mean this one https://stackoverflow.com/questions/806835/django-redirect-to-previous-page-after-login – hansTheFranz Jul 20 '17 at 11:26
  • @hansTheFranz Thanks for the heads up. No, it was [this](https://stackoverflow.com/questions/29168337/override-django-allauth-signup-next-redirect-url/29168537)... – Selcuk Jul 20 '17 at 12:00

0 Answers0