Repository navigation
feat: add oauth support for self-hosted Gitea - #1101
Merged
Merged
Conversation
|
很需要此功能,➕1 另不是domain,而是直接设置url是否可以?内网gitea可能在http下,而且这样也能支持sub-path如 |
Contributor
Author
你说得对 |
try to add oauth support for self-hosted gitea
qwqcode
force-pushed
the
MWTJC-patch-gitea-selfhosted
branch
from
October 28, 2026 15:35
7fd1625 to
4928deb
Compare
qwqcode
force-pushed
the
MWTJC-patch-gitea-selfhosted
branch
from
October 28, 2026 15:46
4928deb to
2032ccc
Compare
Member
|
Thanks for contributing support for self-hosted Gitea. I updated the PR to reuse I also separated accounts across Gitea servers to prevent matching user IDs, names, or emails from linking unrelated accounts. Existing gitea.com accounts keep working. Configuration, documentation, and tests are included. I plan to merge. Thanks |
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.
Add
auth.gitea.site_urlfor self-hosted Gitea. Leave it empty to keep using gitea.com. The URL supports HTTP, HTTPS, ports, and subpaths. The login callback path stays unchanged.Accounts from different Gitea servers stay separate, even when user IDs, names, or emails match. Existing gitea.com accounts keep their current bindings. No new dependencies or database fields are needed.
The change includes configuration templates, environment variables, dashboard support, documentation, and tests. Full Go tests and static analysis passed. Tests also passed with race detection for authentication, configuration, and request handlers. Login tests use a local server that simulates Gitea. We did not test a live Gitea instance.