]> source.dussan.org Git - gitea.git/commitdiff
Use `ImagedProvider` for gplus oauth2 provider (#18504)
authorGusted <williamzijl7@hotmail.com>
Tue, 1 Feb 2022 00:02:56 +0000 (01:02 +0100)
committerGitHub <noreply@github.com>
Tue, 1 Feb 2022 00:02:56 +0000 (01:02 +0100)
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

index 0f118b596d77bb41f3480d5a14b83f24a77a5d0e..39d3d74f6ddc17d748bfed07a6eca6e5598d9a63 100644 (file)
@@ -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 {