Srikrishnan Suresh
Srikrishnan Suresh

Reputation: 729

Stack Overflow OAuth - Python Social Auth

Currently I am using the Python Social Auth module for authenticating users via OAuth service providers such as Google, Facebook, Github and Stack Overflow.

I have completed the process for fb, google and github, but I do not know how to do it for stackoverflow. The tutorial sites say that I need to give the following in settings.py:

SOCIAL_AUTH_STACKOVERFLOW_KEY = ''
SOCIAL_AUTH_STACKOVERFLOW_SECRET = ''
SOCIAL_AUTH_STACKOVERFLOW_API_KEY = ''

What should be given in the template? For instance, I gave the following for google:

<a href = "{% url 'social:begin' 'google-oauth2' %}?next={{ request.path }}" > Google</a>

What is its equivalent for Stack Overflow? Kindly help, thanks in advance.

Upvotes: 0

Views: 114

Answers (2)

outoftime
outoftime

Reputation: 765

Look at psa django template example. All you need to do is to pass correct stackoverflow's backend name. Also verify PSA version to ensure that local packet version support stackoverflow oauth.

Upvotes: 1

Srikrishnan Suresh
Srikrishnan Suresh

Reputation: 729

I got it:

<a href = "{% url 'social:begin' 'stackoverflow' %}?next={{ request.path }}"> Stackoverflow</a></p>

Upvotes: 0

Related Questions