-
Notifications
You must be signed in to change notification settings - Fork 5.1k
OpenID Connect Authentication support #8032
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
Open
francescocaponio
wants to merge
15
commits into
gogs:main
Choose a base branch
from
francescocaponio:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+616
−8
Conversation
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
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
…alidation Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
Co-authored-by: francescocaponio <66728654+francescocaponio@users.noreply.github.com>
…-4c65-b083-8b2862842437 Implement OIDC (OpenID Connect) authentication support with OIDC-only login mode, group-based admin assignment, and customizable button styling
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.
About this PR
Tries to implement the request in #4602 and #7437
With the help of Copilot, we added the support for OIDC authentication.
The OIDC parameters are edited in the admin section, stored in the DB. It is possible to select if the OIDC authentication method is the only available or coexists with other authentication methods in the login form.
The oidc authentication backend is based on the go-oidc module.
It supports auto-discovery of the auth endpoints via the
.well-knownmechanism.The login button can be customized with a custom icon (loaded from a user specified url), background color and text color.
It supports the oidc groups claim and the user can specify the name of a group where users who belongs to this group are automatically elevated to admin roles in gogs.
Checklist
Test plan
I'm attaching some screenshots of the configuration and login forms:
Authentication sources list:
New/edit auth source form:
Login form (OIDC as default login source):
Login form (OIDC not as default login source):