Tiers & lifecycle implementation (#615)
* Tiers & lifecycle implementation * Add a feature flag for ILM * Update pkg/auth/idp/oauth2/provider.go Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com> Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com> Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
@@ -110,6 +110,14 @@ func NewOauth2ProviderClient(ctx context.Context, scopes []string, httpClient *h
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// if google, change scopes
|
||||
u, err := url.Parse(GetIdpURL())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if u.Host == "google.com" {
|
||||
scopes = []string{oidc.ScopeOpenID}
|
||||
}
|
||||
// If provided scopes are empty we use a default list
|
||||
if len(scopes) == 0 {
|
||||
scopes = []string{oidc.ScopeOpenID, "profile", "app_metadata", "user_metadata", "email"}
|
||||
|
||||
Reference in New Issue
Block a user