Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: use username as display name when empty (#4672)

boojack68e9e4e45195
diff --git a/backend/plugin/idp/oidc/oidc.go b/backend/plugin/idp/oidc/oidc.go
index eeb0144f42..bad336f9ae 100644
--- a/backend/plugin/idp/oidc/oidc.go
+++ b/backend/plugin/idp/oidc/oidc.go
@@ -119,6 +119,9 @@ func (p *IdentityProvider) UserInfo(ctx context.Context, token *oauth2.Token, no
userInfo.DisplayName = v
}
}
+ if userInfo.DisplayName == "" {
+ userInfo.DisplayName = userInfo.Identifier
+ }
if p.config.FieldMapping.Email != "" {
if v, ok := claims[p.config.FieldMapping.Email].(string); ok {
userInfo.Email = v