diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-02-01 03:45:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 10:45:58 +0800 |
commit | 483bda4b2d954692b197f93e813402f2a95a9360 (patch) | |
tree | 3669125cb7f0eb3634be9e7d1c8a628994cab65d /services | |
parent | edd57028a15580a7faae352fdd171e291ea71688 (diff) | |
download | gitea-483bda4b2d954692b197f93e813402f2a95a9360.tar.gz gitea-483bda4b2d954692b197f93e813402f2a95a9360.zip |
Use `ImagedProvider` for gplus oauth2 provider (#18504) (#18505)
- Bacport of #18504
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'services')
-rw-r--r-- | services/auth/source/oauth2/providers_simple.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/services/auth/source/oauth2/providers_simple.go b/services/auth/source/oauth2/providers_simple.go index a4d61eb2f3..39d3d74f6d 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 { @@ -107,5 +107,4 @@ func init() { return microsoftonline.New(clientID, secret, callbackURL, scopes...) }, )) - } |