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:
Alex
2021-03-09 14:36:48 -06:00
committed by GitHub
parent d4a69978fc
commit ac77b8b441
77 changed files with 9169 additions and 61 deletions

View File

@@ -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"}