|
|
@ -371,7 +371,6 @@ func (s *SocialWeibo) SetRedirectUrl(url string) { |
|
|
|
func (s *SocialWeibo) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, error) { |
|
|
|
func (s *SocialWeibo) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, error) { |
|
|
|
transport := &oauth.Transport{Token: token} |
|
|
|
transport := &oauth.Transport{Token: token} |
|
|
|
var data struct { |
|
|
|
var data struct { |
|
|
|
Id int64 `json:"id"` |
|
|
|
|
|
|
|
Name string `json:"name"` |
|
|
|
Name string `json:"name"` |
|
|
|
} |
|
|
|
} |
|
|
|
var err error |
|
|
|
var err error |
|
|
@ -390,7 +389,7 @@ func (s *SocialWeibo) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, |
|
|
|
return nil, err |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
} |
|
|
|
return &BasicUserInfo{ |
|
|
|
return &BasicUserInfo{ |
|
|
|
Identity: base.StrTo(data.Id).String(), |
|
|
|
Identity: token.Extra["id_token"], |
|
|
|
Name: data.Name, |
|
|
|
Name: data.Name, |
|
|
|
}, nil |
|
|
|
}, nil |
|
|
|
return nil, nil |
|
|
|
return nil, nil |
|
|
|