Support SSO login via OIDC #1488
Merged
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.
This pull request adds support for OIDC (OpenID Connect) authentication to the application, allowing users to log in using an external OIDC provider. The changes include backend support for OIDC settings and authentication flow, frontend integration for OIDC login, and updates to settings management.
A config example are as follow:
Note
Introduce OIDC-based SSO login, integrating new backend endpoints and settings, frontend login flow, example config, env docs, tests, and dependencies.
GET /oidc_uriandPOST /oidc_callbackusingcoreos/go-oidcandgolang.org/x/oauth2; validates state via cookie, exchanges code, verifies ID token, maps claims for username, and issues JWT.settings.OIDC(client_id,client_secret,endpoint,redirect_uri,scopes,identifier); expose inGET/POST /settings, env parsing, and example config; include tests insettings_test.go.api/settings/settings.goto read/writeoidcand persist; router wires new OIDC endpoints.github.com/coreos/go-oidc/v3and directgolang.org/x/oauth2.get_oidc_uri,oidc_logininapp/src/api/auth.ts.nginx-ui-oidc_state), strips query params post-login.oidcfields and types.[oidc]block toapp.example.ini.docs/guide/env.md,docs/zh_CN/guide/env.md,docs/zh_TW/guide/env.md.Written by Cursor Bugbot for commit e93e83f. This will update automatically on new commits. Configure here.