-
Notifications
You must be signed in to change notification settings - Fork 903
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
fix: google oauth check only on google envs #2106
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Thank you for following the naming conventions for pull request titles! 🙏 |
packages/lib/constants.tsBoolean expressions can be simplified for better readability and performance. There is no need to use a ternary operator to return true or false. The result of the logical operation is a boolean itself. export const GOOGLE_OAUTH_ENABLED = Boolean(env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET);
export const GITHUB_OAUTH_ENABLED = Boolean(env.GITHUB_ID && env.GITHUB_SECRET);
export const AZURE_OAUTH_ENABLED = Boolean(env.AZUREAD_CLIENT_ID && env.AZUREAD_CLIENT_SECRET && env.AZUREAD_TENANT_ID);
|
export const GOOGLE_OAUTH_ENABLED = env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET ? true : false; | ||
export const GITHUB_OAUTH_ENABLED = env.GITHUB_ID && env.GITHUB_SECRET ? true : false; | ||
export const AZURE_OAUTH_ENABLED = | ||
env.AZUREAD_CLIENT_ID && env.AZUREAD_CLIENT_SECRET && env.AZUREAD_TENANT_ID ? true : false; |
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.
Simplified boolean expressions for better readability and performance. Removed unnecessary ternary operators.
export const GOOGLE_OAUTH_ENABLED = env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET ? true : false; | |
export const GITHUB_OAUTH_ENABLED = env.GITHUB_ID && env.GITHUB_SECRET ? true : false; | |
export const AZURE_OAUTH_ENABLED = | |
env.AZUREAD_CLIENT_ID && env.AZUREAD_CLIENT_SECRET && env.AZUREAD_TENANT_ID ? true : false; | |
export const GOOGLE_OAUTH_ENABLED = Boolean(env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET); | |
export const GITHUB_OAUTH_ENABLED = Boolean(env.GITHUB_ID && env.GITHUB_SECRET); | |
export const AZURE_OAUTH_ENABLED = Boolean(env.AZUREAD_CLIENT_ID && env.AZUREAD_CLIENT_SECRET && env.AZUREAD_TENANT_ID); |
What does this PR do?
FIxes Incorrect constants check to enable Google OAuth
Fixes # (issue)
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated