After google's login, I want to be redirected to my page. This is what I do
<a id="google-login" href="/login/google/?next=/static/index.html">Google</a>
But still I get redirected to
/accounts/profile
How can I make django socail auth redirect me to the page I need?
This is my django-social-auth configuration:
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.user.get_username',
'social.pipeline.mail.mail_validation',
'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details'
)
I tried adding at the top:
'myapp.views.redirect_to_such_and_such',
Didnt work.
Again, how can I make django socail auth redirect me to the page I need?
Thanks in advance.
Jenia
Set this:
SOCIAL_AUTH_LOGIN_REDIRECT_URL = 'url_you_want'
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