Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ballet/github-oauth-gateway
Gateway for authenticating with GitHub using OAuth
https://github.com/ballet/github-oauth-gateway
Last synced: 23 days ago
JSON representation
Gateway for authenticating with GitHub using OAuth
- Host: GitHub
- URL: https://github.com/ballet/github-oauth-gateway
- Owner: ballet
- License: mit
- Created: 2020-04-28T16:47:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-16T01:40:09.000Z (almost 2 years ago)
- Last Synced: 2023-03-08T17:02:31.621Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 91.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-oauth-gateway
Gateway for authenticating with GitHub using OAuth.
Primarily used by
[Assemblé](https://github.com/ballet/ballet-assemble)
to authenticate Jupyter Lab sessions with GitHub.There is a free and public deployment at https://github-oauth-gateway.herokuapp.com or you
can deploy your own instance.## Usage
1. get this gateway app's client ID
2. initiate the OAuth login flow with GitHub, providing the client ID from
step 1 as well as a secret key of your choice. After successful
authorization, GitHub will send a secret code to the gateway.
3. request an access token from the gateway; it will exchange the secret code
for an access token with GitHub, send you the access token, and delete any
record of your request.## Deployment
There is a reference deployment at https://github-oauth-gateway.herokuapp.com/
### API Reference
#### app_id
Get the GitHub OAuth App ID of the github-oauth-gateway app
```
GET /api/v1/app_id
```Example response
```json
{"client_id":"5fdfc609dd0081352b93","message":null}
```#### access_token
Exchange the secret state for an OAuth access token
```
POST /api/v1/access_token
```| param | value |
|-------|-------|
| state | secret state (required) |Example response
```json
{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a", "scope":"repo,gist", "token_type":"bearer", "message": null}
```