-
Notifications
You must be signed in to change notification settings - Fork 2
Add GitHub and GitLab SSO support #73
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
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 608dbdae70
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| GitLabProvider({ | ||
| clientId: process.env.GITLAB_CLIENT_ID, | ||
| clientSecret: process.env.GITLAB_CLIENT_SECRET, | ||
| issuer: process.env.GITLAB_ISSUER, | ||
| allowDangerousEmailAccountLinking: true, |
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.
Use GitLab baseUrl instead of issuer
The GitLab provider does not read an issuer option; it expects baseUrl (see node_modules/@auth/core/providers/gitlab.js, where baseUrl defaults to https://gitlab.com and is used to build all OAuth URLs). Passing issuer here is ignored, so any self-managed GitLab deployment that sets GITLAB_ISSUER will still try to authenticate against gitlab.com and fail. This only shows up when someone uses GitLab self-managed, but it will block SSO entirely in that environment.
Useful? React with 👍 / 👎.
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.
@codex - review again. Remove unnecessary variable and will default to gitlab.com.
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.
Codex Review: Didn't find any major issues. Nice work!
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Motivation
Description
src/server/auth/config.ts.GITHUB_*andGITLAB_*env entries to the validated server env schema and runtime bindings insrc/env.ts.src/app/(public-routes)/auth/signin/page.tsxandsrc/features/shared/auth/sign-in-page.tsx..env.example-devanddeploy/docker/.env.example-prod) with commented GitHub/GitLab variables and updatedocs/installation.mdto list the new providers and provide generic SSO configuration guidance.Testing
npm run check(ESLint +tsc --project tsconfig.check.json) which completed successfully.npm run test(Vitest) which failed due to aPrismaClientInitializationErrorbecause the test runner could not reach a PostgreSQL instance atlocalhost:5432.Codex Task