Skip to content

Commit 0fde46d

Browse files
committed
setting on facebook user email method --- change the parameter(key) passed to get the email from map
1 parent 8212e81 commit 0fde46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/handlers/oauth_callback.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ func processFacebookUserInfo(code string) (models.User, error) {
450450
userRawData := make(map[string]interface{})
451451
json.Unmarshal(body, &userRawData)
452452

453-
email := fmt.Sprintf("%v", userRawData["sub"])
453+
email := fmt.Sprintf("%v", userRawData["email"])
454454

455455
picObject := userRawData["picture"].(map[string]interface{})["data"]
456456
picDataObject := picObject.(map[string]interface{})

0 commit comments

Comments
 (0)