Gateway for authenticating with GitHub using OAuth.
Primarily used by Assemblé 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.
- get this gateway app's client ID
- 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.
- 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.
There is a reference deployment at https://github-oauth-gateway.herokuapp.com/
Get the GitHub OAuth App ID of the github-oauth-gateway app
GET /api/v1/app_id
Example response
{"client_id":"5fdfc609dd0081352b93","message":null}
Exchange the secret state for an OAuth access token
POST /api/v1/access_token
param | value |
---|---|
state | secret state (required) |
Example response
{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a", "scope":"repo,gist", "token_type":"bearer", "message": null}