1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

Streamline Google to use default Authorize

This commit is contained in:
Nick Meves
2020-09-26 19:24:06 -07:00
parent eb58ea2ed9
commit b92fd4b0bb
6 changed files with 40 additions and 44 deletions

View File

@ -257,7 +257,13 @@ func parseProviderInfo(o *options.Options, msgs []string) []string {
if err != nil {
msgs = append(msgs, "invalid Google credentials file: "+o.GoogleServiceAccountJSON)
} else {
p.SetGroupRestriction(o.GoogleGroups, o.GoogleAdminEmail, file)
groups := o.AllowedGroups
// Backwards compatibility with `--google-group` option
if len(o.GoogleGroups) > 0 {
groups = o.GoogleGroups
p.SetAllowedGroups(groups)
}
p.SetGroupRestriction(groups, o.GoogleAdminEmail, file)
}
}
case *providers.BitbucketProvider: