[Fix] Guard GitLab OAuth public callback URL selection with regression tests#374
Merged
brunobergher merged 1 commit intoJul 15, 2026
Merged
Conversation
Lock authorize/callback routes to R_PUBLIC_URL when set and document callback matching.
Contributor
Author
brunobergher
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Follow-up coverage for the GitLab OAuth public-URL fix already merged in #352 (
R_PUBLIC_URLfor authorize/callback redirects and secure cookies). No separate GitHub issue.Why this PR exists
What changed
Adds regression tests so GitLab OAuth authorize and callback keep using
R_PUBLIC_URL(when set) forredirect_uri, post-auth setup redirects, andSecurecookie flags, with anR_APP_URLfallback. Also tightens the public docs note that the GitLab OAuth application redirect URI must match that public origin.Runtime redirect selection itself was already shipped on
developin #352; this change locks that behavior in and clarifies the match requirement operators already see in setup docs/UI.How it was tested
pnpm --filter @roomote/web exec dotenvx run -f ../../.env.test -- vitest run src/app/api/source-control/gitlab/oauth(6 passed)pnpm --filter @roomote/gitlab exec vitest run src/__tests__/oauth.test.ts(2 passed)Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset