@@ -3,6 +3,7 @@ package options
@@ -494,7 +495,8 @@ type LegacyProvider struct {
494 GitHubUsers []string `flag:"github-user" cfg:"github_users"`
495 GitHubUsers []string `flag:"github-user" cfg:"github_users"`
495 GitLabGroup []string `flag:"gitlab-group" cfg:"gitlab_groups"`
496 GitLabGroup []string `flag:"gitlab-group" cfg:"gitlab_groups"`
496 GitLabProjects []string `flag:"gitlab-project" cfg:"gitlab_projects"`
497 GitLabProjects []string `flag:"gitlab-project" cfg:"gitlab_projects"`
498+ GoogleGroupsLegacy []string `flag:"google-group" cfg:"google_group"`
497− GoogleGroups []string `flag:"google-group" cfg:"google_group"`
499+ GoogleGroups []string `flag:"google-group" cfg:"google_groups"`
498 GoogleAdminEmail string `flag:"google-admin-email" cfg:"google_admin_email"`
500 GoogleAdminEmail string `flag:"google-admin-email" cfg:"google_admin_email"`
499 GoogleServiceAccountJSON string `flag:"google-service-account-json" cfg:"google_service_account_json"`
501 GoogleServiceAccountJSON string `flag:"google-service-account-json" cfg:"google_service_account_json"`
500 GoogleUseApplicationDefaultCredentials bool `flag:"google-use-application-default-credentials" cfg:"google_use_application_default_credentials"`
502 GoogleUseApplicationDefaultCredentials bool `flag:"google-use-application-default-credentials" cfg:"google_use_application_default_credentials"`
@@ -727,6 +729,13 @@ func (l *LegacyProvider) convert() (Providers, error) {
727 Repository: l.BitbucketRepository,
729 Repository: l.BitbucketRepository,
729 case "google":
731 case "google":
732+ if len(l.GoogleGroupsLegacy) != 0 && !reflect.DeepEqual(l.GoogleGroupsLegacy, l.GoogleGroups) {
733+ // Log the deprecation notice
735+ "WARNING: The 'OAUTH2_PROXY_GOOGLE_GROUP' environment variable is deprecated and will likely be removed in the next major release. Use 'OAUTH2_PROXY_GOOGLE_GROUPS' instead.",
737+ l.GoogleGroups = l.GoogleGroupsLegacy
730 provider.GoogleConfig = GoogleOptions{
739 provider.GoogleConfig = GoogleOptions{
731 Groups: l.GoogleGroups,
740 Groups: l.GoogleGroups,
732 AdminEmail: l.GoogleAdminEmail,
741 AdminEmail: l.GoogleAdminEmail,