README.md

May 15, 2026 ยท View on GitHub

Github OAuth2

Serverless For Vercel

Demo

  • https://github-oauth-opal.vercel.app
  • https://github-oauth-opal.vercel.app/api/oauth
  • https://github-oauth-opal.vercel.app/api/user

Environment variable

{
  "client_id": "xxx",
  "client_secret": "xxx"
}

Usage

  • Fork
  • Make sure to make the warehouse private
  • https://github.com/apps/vercel

Example For JS

fetch("/api/oauth?code=xxx", {
  method: "GET",
}).then((res) => {
  console.log(res);
  // ...
});

Contents

  1. 1Demo
  2. 2Environment variable
  3. 3Usage
  4. 4Example For JS