4

I'm new to Python and Django and am trying to get social auth (https://github.com/omab/django-social-auth) to work. I'd like to connect using Github, but am not having much success and the example provided is a bit overwhelming to someone starting out. Are there any recent tutorials available that explain how to use the latest version of social auth to setup GitHub authentication to a beginner?

1 Answer 1

8

Did you read the documentation provided here

After installing the app, you need to do a bunch of configuration including specifying the Github backend

You might also want to read up about the OAuth Protocol and what are all the tokens you need and how to obtain them.

If you need to access github specific API's only, I would encourage you to look into PyGithub

The authentication is as simple as doing g = Github( token ) where token is from oauth.

Reading repos is as follows

for repo in g.get_user().get_repos():
    print repo.name
    repo.edit( has_wiki = False ) 

A related question to this is Most suitable python library for Github API v3

Sign up to request clarification or add additional context in comments.

1 Comment

I finally got the authentication to work. Is there a way to get the logged in user's repos on Github from social_auth?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.