https://github.com/janbaer/github-oauth-bridge
A webapi bridge to use Github Oauth directly from a Webclient
https://github.com/janbaer/github-oauth-bridge
github go golang oauth2
Last synced: 6 months ago
JSON representation
A webapi bridge to use Github Oauth directly from a Webclient
- Host: GitHub
- URL: https://github.com/janbaer/github-oauth-bridge
- Owner: janbaer
- Created: 2018-08-26T10:44:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-10T07:36:10.000Z (over 1 year ago)
- Last Synced: 2024-11-10T08:24:46.636Z (over 1 year ago)
- Topics: github, go, golang, oauth2
- Language: Go
- Homepage: github-oauth-bridge-jan-baer.vercel.app
- Size: 3.11 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Oauth2 bridge api
[](https://travis-ci.com/janbaer/github-oauth-bridge)
This Project contains my source code for my bridge to the Github Oauth. The reason why I wrote this
project is, that using the Github Oauth process is not possible from a web client.
The reason for it is, that the second call to Github in the Oauth workflow
(https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow)
is a Post request and it's not supporting CORS which makes it impossible to send this request from a
webclient.
The webapi needs a configuration file which contains all necessary configuration values that are
required to process the oauth login. Since they also have to contain the **secret** id, the config file
is not part of this Git repository.
But here's a sample config file:
```
[
{
"redirectUrl": "http://localhost:3000/#/login",
"clientId": "12345",
"clientSecretId": "23424fhsdfsd014141"
}
]
```
To use the bridge you have to send a request to the following url {host}/login?clientId=12345