https://github.com/helloflask/github-login
Example application for login with GitHub by GitHub-Flask
https://github.com/helloflask/github-login
Last synced: 11 months ago
JSON representation
Example application for login with GitHub by GitHub-Flask
- Host: GitHub
- URL: https://github.com/helloflask/github-login
- Owner: helloflask
- License: mit
- Created: 2018-07-19T09:46:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T09:30:52.000Z (over 7 years ago)
- Last Synced: 2024-03-02T16:34:05.125Z (about 2 years ago)
- Language: Python
- Homepage: https://helloflask.pythonanywhere.com
- Size: 8.79 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub-Login
Example application for login with GitHub by GitHub-Flask
## Online Demo
https://helloflask.pythonanywhere.com
## Installation
```
$ git clone https://github.com/helloflask/github-login
$ cd github-login
```
## Register Your OAuth Application on GitHub
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:
```python
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.*
## Run
Just excute:
```
$ flask run
```
Then go to http://localhost:5000
# For Readers of Hello, Flask!
这个示例程序的介绍文章为[《使用GitHub-Flask实现GitHub第三方登录》](https://zhuanlan.zhihu.com/p/39026635)。