https://github.com/xjh22222228/github-oauth2
Github OAuth2 for Go
https://github.com/xjh22222228/github-oauth2
oauth2 serverless vercel
Last synced: 10 months ago
JSON representation
Github OAuth2 for Go
- Host: GitHub
- URL: https://github.com/xjh22222228/github-oauth2
- Owner: xjh22222228
- License: mit
- Created: 2021-03-26T00:53:59.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T03:38:17.000Z (almost 2 years ago)
- Last Synced: 2025-04-19T17:58:07.621Z (12 months ago)
- Topics: oauth2, serverless, vercel
- Language: Go
- Homepage: https://github-oauth2-indol.vercel.app
- Size: 28.3 KB
- Stars: 7
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Github OAuth2
Serverless For Vercel
## Demo
- [https://github-oauth-opal.vercel.app](https://github-oauth-opal.vercel.app)
- [https://github-oauth-opal.vercel.app/api/oauth](https://github-oauth-opal.vercel.app/api/oauth)
- [https://github-oauth-opal.vercel.app/api/user](https://github-oauth-opal.vercel.app/api/user)
## Environment variable
```json
{
"client_id": "xxx",
"client_secret": "xxx"
}
```
## Usage
- Fork
- Make sure to make the warehouse private
- https://github.com/apps/vercel
- ...
## Example For JS
```js
fetch("/api/oauth?code=xxx", {
method: "GET",
}).then((res) => {
console.log(res);
// ...
});
```