-
Notifications
You must be signed in to change notification settings - Fork 190
🔧 Update GitHub auth configuration to use environment variables directly #929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
|
Updates to Preview Branch (chore/env-file) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
d35e51b to
da473e1
Compare
|
The schema changes provided involve modifications to two files related to GitHub integration: one in a TypeScript configuration file and the other in a Supabase configuration file. Below is a detailed review of these changes:
Overall Assessment: Migration URL: https://liam-app-git-staging-route-06-core.vercel.app/app/projects/4/migrations/13 |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
MH4GF
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍🏻
NoritakaIkeda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| export const githubConfig = { | ||
| appId: process.env.GITHUB_APP_ID, | ||
| privateKey: process.env.GITHUB_PRIVATE_KEY, | ||
| webhookSecret: process.env.GITHUB_WEBHOOK_SECRET, | ||
| clientId: process.env.GITHUB_CLIENT_ID, | ||
| clientSecret: process.env.GITHUB_CLIENT_SECRET, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 I have confirmed that githubConfig is not referenced elsewhere.
| client_id = "env(SUPABASE_AUTH_GITHUB_CLIENT_ID)" | ||
| secret = "env(SUPABASE_AUTH_GITHUB_SECRET)" | ||
| client_id = "env(GITHUB_CLIENT_ID)" | ||
| secret = "env(GITHUB_CLIENT_SECRET)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 I have confirmed that SUPABASE_AUTH_GITHUB_CLIENT_ID and GITHUB_CLIENT_ID, as well as SUPABASE_AUTH_GITHUB_SECRET and GITHUB_CLIENT_SECRET, have the same values on Vercel.
Issue
Why is this change needed?
Since there were multiple environment variables serving the same purpose, I wanted to consolidate them into one to avoid confusion.
Upon checking Vercel's Environments, I found that
SUPABASE_AUTH_GITHUB_CLIENT_IDandSUPABASE_AUTH_GITHUB_SECRETwere registered only for the Development environment, and their keys contained production environment values. Therefore, I decided that changing the keys referenced in config.toml toGITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETwould not be an issue.What would you like reviewers to focus on?
Testing Verification
I confirmed whether GitHub authentication works on the staging branch.
2025-03-21.15.42.17.mov
ref. #922
What was done
🤖 Generated by PR Agent at da473e1
config.tomlto reference new environment variable keys.Detailed Changes
config.ts
Removed hardcoded GitHub configuration objectfrontend/apps/app/libs/github/config.ts
config.toml
Updated GitHub OAuth configuration in `config.toml`frontend/packages/db/supabase/config.toml
SUPABASE_AUTH_GITHUB_CLIENT_IDandSUPABASE_AUTH_GITHUB_SECRETwithGITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET.Additional Notes