diff --git a/routers/web/admin/auths.go b/routers/web/admin/auths.go index 338a54c5dd264..20f364739e12e 100644 --- a/routers/web/admin/auths.go +++ b/routers/web/admin/auths.go @@ -192,6 +192,9 @@ func parseOAuth2Config(form forms.AuthenticationForm) *oauth2.Source { RequiredClaimName: form.Oauth2RequiredClaimName, RequiredClaimValue: form.Oauth2RequiredClaimValue, SkipLocalTwoFA: form.SkipLocalTwoFA, + GroupClaimName: form.Oauth2GroupClaimName, + RestrictedGroup: form.Oauth2RestrictedGroup, + AdminGroup: form.Oauth2AdminGroup, } } diff --git a/routers/web/auth/oauth.go b/routers/web/auth/oauth.go index fa2b0aa65f1f8..dbd17563484da 100644 --- a/routers/web/auth/oauth.go +++ b/routers/web/auth/oauth.go @@ -904,6 +904,10 @@ func claimValueToStringSlice(claimValue interface{}) []string { switch rawGroup := claimValue.(type) { case []string: groups = rawGroup + case []interface{}: + for _, group := range rawGroup { + groups = append(groups, fmt.Sprintf("%s", group)) + } default: str := fmt.Sprintf("%s", rawGroup) groups = strings.Split(str, ",")