core: preserve Gitea deployment prefixes for OAuth by Huang-404-Q · Pull Request #2479 · git-ecosystem/git-credential-manager · GitHub
Skip to content

core: preserve Gitea deployment prefixes for OAuth - #2479

Open
Huang-404-Q wants to merge 3 commits into
git-ecosystem:mainfrom
Huang-404-Q:fix/gitea-subfolder-oauth
Open

Huang-404-Q wants to merge 3 commits into
git-ecosystem:mainfrom
Huang-404-Q:fix/gitea-subfolder-oauth

Conversation

@Huang-404-Q

Copy link
Copy Markdown

Summary

  • preserve a Gitea instance's deployment prefix when constructing universal OAuth endpoints
  • add a regression test for Gitea hosted under a subfolder

Validation

  • dotnet build git-credential-manager.slnx
  • dotnet test git-credential-manager.slnx

Fixes #1650

@Huang-404-Q
Huang-404-Q requested a review from a team as a code owner October 18, 2026 13:32
Comment thread src/Core/GenericOAuthConfig.cs Outdated
Comment thread src/Core/GenericOAuthConfig.cs Outdated
Comment thread src/Core/GenericOAuthConfig.cs Outdated
@Huang-404-Q

Copy link
Copy Markdown
Author

@Huang-404-Q

Copy link
Copy Markdown
Author

@becm Thanks — all three suggestions are in 5b738b6 and the threads are resolved. Could you take another look when you have a moment?

@becm becm left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For completeness, a test for the generic case of an empty path could be added.
But this would effectively just demonstrate the behavior of .Take(-2). 😄

Adds the generic empty-path case the reviewer asked for: an empty path
yields no prefix segments, so the endpoints stay at the host root.
@Huang-404-Q

Copy link
Copy Markdown
Author

@hildelesen

This comment was marked as low quality.

This branch has not been deployed

No deployments
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.

Universal Gitea OAuth configuration uses wrong endpoints if gitea uses a subfolder

3 participants