Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4d97736
feat: support custom oauth & oidc providers
cemalkilic Jan 28, 2026
5cb16d5
fix: add migration annotation
cemalkilic Jan 28, 2026
6a39314
fix: store jsonb
cemalkilic Jan 28, 2026
18c889b
fix: formatting
cemalkilic Jan 28, 2026
86252f8
fix: lint
cemalkilic Jan 28, 2026
c6a4826
fix: returns original claims if json unmarshal fails
cemalkilic Jan 28, 2026
3a7f58f
fix: add nosec for test urls
cemalkilic Jan 28, 2026
82acfe7
fix: update admin endpoint tests
cemalkilic Jan 28, 2026
b8b8899
fix: url validator tests
cemalkilic Jan 28, 2026
a46d4d0
feat: add openapi spec
cemalkilic Jan 29, 2026
ad78318
fix: delete client test
cemalkilic Jan 29, 2026
3a6933e
fix: enforce encryption of client secret
cemalkilic Feb 5, 2026
81e6b2c
fix: validate oauth urls during update
cemalkilic Feb 5, 2026
e598081
fix: prevent `phone_verified` and `email_verified` overrides
cemalkilic Feb 5, 2026
86408bb
Revert "fix: enforce encryption of client secret"
cemalkilic Feb 5, 2026
7cb9ed8
feat: address PR reviews
cemalkilic Feb 18, 2026
3098a4c
feat: don’t fallback to userinfo endpoint if idtoken validation fails
cemalkilic Feb 18, 2026
a28fdab
feat: make authorizationParams simple key-value pair
cemalkilic Feb 18, 2026
9430fee
feat: simpler authorizationParams
cemalkilic Feb 18, 2026
ae9b0f9
fix: require `custom:` prefix
cemalkilic Feb 18, 2026
d1c87f2
feat: check if feature flag is enabled for custom oauth providers
cemalkilic Feb 18, 2026
3a908f5
feat: space separated scopes in authorize request
cemalkilic Feb 18, 2026
1b5ae97
fix: return empty array instead of null for list endpoint
cemalkilic Feb 19, 2026
fd2a9ca
fix: marshal `updatedAt` properly
cemalkilic Feb 19, 2026
5c2cfa1
fix: clarify error codes for custom provider
cemalkilic Feb 19, 2026
1c60ffe
chore: rename migration
cemalkilic Feb 19, 2026
6827d07
fix: sorting on list endpoint
cemalkilic Feb 19, 2026
faa485c
chore: update auth migration annotation
cemalkilic Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ require (
github.com/lestrrat-go/httprc v1.0.5 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
Expand Down
15 changes: 15 additions & 0 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,21 @@ func NewAPIWithVersion(globalConfig *conf.GlobalConfiguration, db *storage.Conne
})
})
}

// Custom OAuth/OIDC provider management endpoints
if globalConfig.CustomOAuth.Enabled {
r.Route("/custom-providers", func(r *router) {
// supports both OAuth2 and OIDC via provider_type)
r.Get("/", api.adminCustomOAuthProvidersList) // Optional ?type=oauth2 or ?type=oidc filter
r.Post("/", api.adminCustomOAuthProviderCreate) // provider_type in request body

r.Route("/{identifier}", func(r *router) {
r.Get("/", api.adminCustomOAuthProviderGet)
r.Put("/", api.adminCustomOAuthProviderUpdate)
Comment thread
cemalkilic marked this conversation as resolved.
r.Delete("/", api.adminCustomOAuthProviderDelete)
})
})
}
})

// OAuth Dynamic Client Registration endpoint (public, rate limited)
Expand Down
5 changes: 5 additions & 0 deletions internal/api/apierrors/errorcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,9 @@ const (
ErrorCodeOAuthClientNotFound ErrorCode = "oauth_client_not_found"
ErrorCodeOAuthAuthorizationNotFound ErrorCode = "oauth_authorization_not_found"
ErrorCodeOAuthConsentNotFound ErrorCode = "oauth_consent_not_found"

// Custom OAuth/OIDC provider error codes
Comment thread
cemalkilic marked this conversation as resolved.
Outdated
ErrorCodeProviderNotFound ErrorCode = "provider_not_found"
ErrorCodeFeatureDisabled ErrorCode = "feature_disabled"
ErrorCodeOverQuota ErrorCode = "over_quota"
Comment thread
cemalkilic marked this conversation as resolved.
Outdated
)
Loading