refactor: remove ClientId/ClientSecret/RedirectUrl in IdProvider int /idp/github.go & google.go & qq.go; alter Scopes in QqIdProvider.Config: profile&email -> get_user_info

Signed-off-by: Weihao <1340908470@qq.com>
This commit is contained in:
Weihao
2021-05-16 00:22:15 +08:00
parent 55e0fe14ca
commit f48e04ef15
3 changed files with 14 additions and 35 deletions

View File

@ -25,19 +25,12 @@ import (
)
type GoogleIdProvider struct {
Client *http.Client
Config *oauth2.Config
ClientId string
ClientSecret string
RedirectUrl string
Client *http.Client
Config *oauth2.Config
}
func NewGoogleIdProvider(clientId string, clientSecret string, redirectUrl string) *GoogleIdProvider {
idp := &GoogleIdProvider{
ClientId: clientId,
ClientSecret: clientSecret,
RedirectUrl: redirectUrl,
}
idp := &GoogleIdProvider{}
config := idp.getConfig()
config.ClientID = clientId