Auth: Remove Email Lookup from oauth integrations 9.4 (#896)

backport https://github.com/grafana/grafana-private-mirror/pull/894 to 9.4.x
This commit is contained in:
Ieva
2023-06-23 08:58:42 +02:00
committed by Horst Gutmann
parent 1a07dc5db0
commit 5829fdd399
2 changed files with 13 additions and 9 deletions
+4 -1
View File
@@ -326,7 +326,8 @@ type Cfg struct {
AuthProxySyncTTL int
// OAuth
OAuthCookieMaxAge int
OAuthCookieMaxAge int
OAuthAllowInsecureEmailLookup bool
// JWT Auth
JWTAuthEnabled bool
@@ -1457,6 +1458,8 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
return err
}
cfg.OAuthAllowInsecureEmailLookup = auth.Key("oauth_allow_insecure_email_lookup").MustBool(false)
const defaultMaxLifetime = "30d"
maxLifetimeDurationVal := valueAsString(auth, "login_maximum_lifetime_duration", defaultMaxLifetime)
cfg.LoginMaxLifetime, err = gtime.ParseDuration(maxLifetimeDurationVal)