1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-12-20 21:01:17 +00:00

Fix: Only overwrite default if config is non-empty

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-04-23 00:40:47 +02:00
parent 6575bc553d
commit 2b15b34bb4
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -76,7 +76,11 @@ func (a *AuthGoogleOAuth) Configure(yamlSource []byte) (err error) {
a.ClientSecret = envelope.Providers.GoogleOAuth.ClientSecret a.ClientSecret = envelope.Providers.GoogleOAuth.ClientSecret
a.RedirectURL = envelope.Providers.GoogleOAuth.RedirectURL a.RedirectURL = envelope.Providers.GoogleOAuth.RedirectURL
a.RequireDomain = envelope.Providers.GoogleOAuth.RequireDomain 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 a.cookie = envelope.Cookie
return nil return nil