Skip to content

feat(auth): implement GitHub OAuth to distribute API rate limits across authenticated users#5744

Open
kanishka-2007-tech wants to merge 10 commits into
JhaSourav07:mainfrom
kanishka-2007-tech:Oauth
Open

feat(auth): implement GitHub OAuth to distribute API rate limits across authenticated users#5744
kanishka-2007-tech wants to merge 10 commits into
JhaSourav07:mainfrom
kanishka-2007-tech:Oauth

Conversation

@kanishka-2007-tech

@kanishka-2007-tech kanishka-2007-tech commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces GitHub OAuth authentication to reduce dependency on the application's global Personal Access Token (PAT) and prevent rate-limit exhaustion under high traffic.

Authenticated users can now sign in with GitHub, allowing dashboard-related GitHub API requests to be performed using their personal OAuth access token. The existing server PAT is retained as a fallback for unauthenticated users and README SVG generation endpoints.

Solution

Implemented GitHub OAuth authentication using NextAuth.

  • Authentication Flow
  • Added Sign in with GitHub functionality.
  • Users can authenticate via GitHub OAuth.
  • GitHub access tokens are stored securely in the session/JWT.
  • Dashboard requests automatically use the authenticated user's token.
  • Unauthenticated requests continue using the server PAT as a fallback.

Fixes #3679

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🛠️ Other (Bug fix, refactoring, docs)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@kanishka-2007-tech is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jun 15, 2026
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

Asset PR Size Base Size Difference Status
static/chunks/app/api/Auth/Nextauthgithub/route-[hash].js 0.19 KB - +0.19 KB (++100%) 🆕 New

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3434.17 KB 3433.75 KB +0.41 KB (+0.01%)
Total CSS 258.05 KB 258.05 KB 0 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: GitHub OAuth Integration

1 participant