Skip to content

Commit

Permalink
fix: use openid or unionid as username rather than nickname when logg…
Browse files Browse the repository at this point in the history
…ing with WeChat (beego#763)

FIX beego#762
  • Loading branch information
caoshengdong authored May 31, 2022
1 parent b85ad89 commit 5d8b710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion idp/wechat.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (idp *WeChatIdProvider) GetUserInfo(token *oauth2.Token) (*UserInfo, error)

userInfo := UserInfo{
Id: id,
Username: wechatUserInfo.Nickname,
Username: id,
DisplayName: wechatUserInfo.Nickname,
AvatarUrl: wechatUserInfo.Headimgurl,
}
Expand Down

0 comments on commit 5d8b710

Please sign in to comment.