Skip to content

Commit

Permalink
Use ImagedProvider for gplus oauth2 provider (go-gitea#18504) (go-g…
Browse files Browse the repository at this point in the history
…itea#18505)

- Bacport of go-gitea#18504

Co-authored-by: 6543 <6543@obermui.de>
  • Loading branch information
Gusted and 6543 authored Feb 1, 2022
1 parent edd5702 commit 483bda4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions services/auth/source/oauth2/providers_simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -107,5 +107,4 @@ func init() {
return microsoftonline.New(clientID, secret, callbackURL, scopes...)
},
))

}

0 comments on commit 483bda4

Please sign in to comment.