Example application for login with GitHub by GitHub-Flask
https://helloflask.pythonanywhere.com
$ git clone https://github.com/helloflask/github-login
$ cd github-login
Go to https://github.com/settings/applications/new
Fill the form, then you will get your Client ID and Client Secret, write them into app.py:
app.config['GITHUB_CLIENT_ID'] = 'your_client_id'
app.config['GITHUB_CLIENT_SECRET'] = 'your_clent_secret'
Warning: You normally need to save this values as enviroment variable in production.
Just excute:
$ flask run
Then go to http://localhost:5000
这个示例程序的介绍文章为《使用GitHub-Flask实现GitHub第三方登录》。