summaryrefslogtreecommitdiffstats
path: root/modules/social
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-14 06:29:47 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-14 06:29:47 -0400
commit337eef2ee57707f055042db21b7b4159db0f0200 (patch)
tree33539bd67a873922315101c82e61584ff206e58c /modules/social
parent516baa45311a515f81a8ba19e3bf2e75e107b07f (diff)
downloadgitea-337eef2ee57707f055042db21b7b4159db0f0200.tar.gz
gitea-337eef2ee57707f055042db21b7b4159db0f0200.zip
Weibo oauth
Diffstat (limited to 'modules/social')
-rw-r--r--modules/social/social.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/social/social.go b/modules/social/social.go
index ac63b61582..a628bfe639 100644
--- a/modules/social/social.go
+++ b/modules/social/social.go
@@ -371,7 +371,6 @@ func (s *SocialWeibo) SetRedirectUrl(url string) {
func (s *SocialWeibo) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo, error) {
transport := &oauth.Transport{Token: token}
var data struct {
- Id int64 `json:"id"`
Name string `json:"name"`
}
var err error
@@ -390,7 +389,7 @@ func (s *SocialWeibo) UserInfo(token *oauth.Token, _ *url.URL) (*BasicUserInfo,
return nil, err
}
return &BasicUserInfo{
- Identity: base.StrTo(data.Id).String(),
+ Identity: token.Extra["id_token"],
Name: data.Name,
}, nil
return nil, nil