After connecting the account in the social application using django-allauth, the user is redirected to accounts/social/connections . How can I change this behavior?
accounts/social/connections
If the user adds more social accounts to his existing (local) account, then the most logical default would be to redirect to the connection management screen of social accounts.
However, you can easily override the default value by going through the following parameter. Look at here:
https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/helpers.py#L125
You will see that the next parameter is checked, returns to the default (connection).
next
So, to change the default behavior, just pass the following parameter:
<a href="{% provider_login_url "openid" openid="https://www.google.com/accounts/o8/id" next="/success/url/" %}">Google</a>
If you use default templates, you will need to add the following URLs:
https://github.com/pennersr/django-allauth/blob/master/allauth/templates/socialaccount/connections.html#L53
Source: https://habr.com/ru/post/1210327/More articles:Removing a folder and all its contents with Qt? - c ++Error-prone code accidentally started working, but then broke again when updating - javascriptUnable to load driver class: com.mysql.jdbc.Driver using Gradle and Spring boot - springCSS / HTML Modal - using the Escape key / Click outside to close - htmlDjango allauth redirect after social registration - pythonCalling Python scripts in Meteor - pythonCasting in Java (interface and class) - javaRuby 2.2.0 will not start due to a problem with libgmp.10.dylib - ruby โโ| fooobar.comIs Android ViewParent a guarantee for a view group? - androidC ++ 11 binding rules for const && - c ++All Articles