Skip to content

feat(auth): use logged-in user's GitHub OAuth provider_token instead of shared GITHUB_TOKEN - #1015

Merged
Rahul-pamula merged 1 commit into
mainfrom
feat/issue-1010-user-github-oauth-token
Dec 2, 2026
Merged

Rahul-pamula merged 1 commit into
mainfrom
feat/issue-1010-user-github-oauth-token

Conversation

@Rahul-pamula

Copy link
Copy Markdown
Owner

Closes #1010

Summary

  • Requests public_repo read:user user:email OAuth scopes in AuthContext.tsx and persists/clears provider_token in sessionStorage.
  • Adds getGitHubTokenHeaders(session) in apps/web/src/services/supabase.ts and passes x-github-token when invoking engage from MissionControl.tsx and DossierPanel.tsx.
  • Updates supabase/functions/_shared/cors.ts to allow x-github-token.
  • Adds createGitHubClient(req) and createUserGitHubWriteClient(req) in supabase/functions/_shared/github.ts so engage posts comments strictly under the logged-in user's GitHub account (failing with 401 if missing, unless ALLOW_SHARED_GITHUB_TOKEN=true is set for single-tenant self-hosting).

@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a0c3f35-b282-452f-8e86-84666d1e699a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T12:17:45.030456Z 941ce40 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Rahul-pamula
Rahul-pamula merged commit cf8b197 into main Dec 2, 2026
3 checks passed
@Rahul-pamula
Rahul-pamula deleted the feat/issue-1010-user-github-oauth-token branch December 2, 2026 12:16
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.

feat(auth): use logged-in user's GitHub OAuth provider_token instead of shared GITHUB_TOKEN

1 participant