From 2b15b34bb4f0565aa478f4e49f22acf7258a2489 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 23 Apr 2019 00:40:47 +0200 Subject: [PATCH] Fix: Only overwrite default if config is non-empty Signed-off-by: Knut Ahlers --- plugins/auth/google/auth.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/auth/google/auth.go b/plugins/auth/google/auth.go index ab6805a..fe3ba3f 100644 --- a/plugins/auth/google/auth.go +++ b/plugins/auth/google/auth.go @@ -76,7 +76,11 @@ func (a *AuthGoogleOAuth) Configure(yamlSource []byte) (err error) { a.ClientSecret = envelope.Providers.GoogleOAuth.ClientSecret a.RedirectURL = envelope.Providers.GoogleOAuth.RedirectURL a.RequireDomain = envelope.Providers.GoogleOAuth.RequireDomain - a.UserIDMethod = envelope.Providers.GoogleOAuth.UserIDMethod + + if envelope.Providers.GoogleOAuth.UserIDMethod != "" { + a.UserIDMethod = envelope.Providers.GoogleOAuth.UserIDMethod + } + a.cookie = envelope.Cookie return nil