Skip to content Skip to sidebar Skip to footer

Python Social Auth Redirecting To The Same Url

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 face

Solution 1:

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

Solution 2:

Try adding these in your config.py (if imported to settings.py, if not - add in settings.py):

SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/anuncio/adicionar/'SOCIAL_AUTH_LOGIN_URL = '/login'

These definitions determine the redirection url after authentication using facebook.

Post a Comment for "Python Social Auth Redirecting To The Same Url"