fix: facebook login exceptions (#508)

* Fix the exception caused by "Username" being empty when logging in with facebook

* fix: facebook login missing "Username" exception
This commit is contained in:
Jerry 2022-02-23 23:58:17 +08:00 committed by GitHub
parent cbc8c58e85
commit e738c42bd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,6 +164,7 @@ func (idp *FacebookIdProvider) GetUserInfo(token *oauth2.Token) (*UserInfo, erro
userInfo := UserInfo{
Id: facebookUserInfo.Id,
Username: facebookUserInfo.Name,
DisplayName: facebookUserInfo.Name,
Email: facebookUserInfo.Email,
AvatarUrl: facebookUserInfo.Picture.Data.Url,