Example Flask web-app to use GitHub API with OAuth
- Python 3.3+
- Foreman
Go to https://github.com/settings/applications/new
Authorization callback URL should be http://localhost:5000/callback/github
$ git clone https://github.com/orangain/example-github-oauth-flask.git
$ cd example-github-oauth-flask
$ virtualenv --python=python3 venv # if you use virtualenv
$ . venv/bin/activate # if you use virtualenv
(venv)$ pip install -r requirements.txt
example-github-oauth-flask/.env
GITHUB_CLIENT_ID=(Your app's client ID)
GITHUB_CLIENT_SECRET=(Your apps' client secret)
SESSION_SECRET_KEY=(Random string)
(venv)$ foreman run python github_oauth.py
Visit http://localhost:5000/ and you will see
Public Domain. See: LICENSE