Skip to content

Instantly share code, notes, and snippets.

@cansadadeserfeliz
Last active August 29, 2015 14:06
Show Gist options
  • Save cansadadeserfeliz/f48589c62e0425ff96d5 to your computer and use it in GitHub Desktop.
Save cansadadeserfeliz/f48589c62e0425ff96d5 to your computer and use it in GitHub Desktop.
Python-social-auth: redirect after login (including GET parameters)
<a class="facebook-button" id="js-facebook_link" href="{% url 'social:begin' 'facebook' %}?next={{ request.get_full_path|urlencode }}">
<span class="img-facebook-login"></span>Login with Facebook
</a>
<a class="twitter-button" id="" href="{% url 'social:begin' 'twitter' %}?next={{ request.get_full_path|urlencode }}">
<span class="img-twitter-login"></span>Login with Twitter
</a>
<a class="linkedin-button" id="" href="{% url 'social:begin' 'linkedin' %}?next={{ request.get_full_path|urlencode }}">
<span class="img-linkedin-login"></span>Login with LinkedIn
</a>
<a class="google-button" id="" href="{% url 'social:begin' 'google-oauth2' %}?next={{ request.get_full_path|urlencode }}">
<span class="img-google-login"></span>Login with Google
</a>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment