From baa6189a03e6c1acc50707ae1cb99e57d4c45ce0 Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 31 Jan 2022 21:47:15 +0100 Subject: [PATCH] Use `ImagedProvider` for gplus oauth2 provider - Use `ImagedProvider` for gplus' oauthv2 provider, as the image isn't "gplus.png" but "google.png". - Resolves #18494 --- services/auth/source/oauth2/providers_simple.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/auth/source/oauth2/providers_simple.go b/services/auth/source/oauth2/providers_simple.go index 0f118b596d77b..39d3d74f6ddc1 100644 --- a/services/auth/source/oauth2/providers_simple.go +++ b/services/auth/source/oauth2/providers_simple.go @@ -70,13 +70,13 @@ func init() { })) // named gplus due to legacy gplus -> google migration (Google killed Google+). This ensures old connections still work - RegisterGothProvider(NewSimpleProvider("gplus", "Google", []string{"email"}, + RegisterGothProvider(NewImagedProvider("/assets/img/auth/google.png", NewSimpleProvider("gplus", "Google", []string{"email"}, func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { if setting.OAuth2Client.UpdateAvatar || setting.OAuth2Client.EnableAutoRegistration { scopes = append(scopes, "profile") } return google.New(clientKey, secret, callbackURL, scopes...) - })) + }))) RegisterGothProvider(NewSimpleProvider("twitter", "Twitter", nil, func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider {