From 71b2c24e641881068ed37cb8e6be3b268c1ed571 Mon Sep 17 00:00:00 2001 From: reappayhenry Date: Thu, 23 Jun 2022 12:53:25 +0900 Subject: [PATCH] feat: add user email in kakao --- providers/kakao/kakao.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/providers/kakao/kakao.go b/providers/kakao/kakao.go index 8743f4d21..caafa6862 100644 --- a/providers/kakao/kakao.go +++ b/providers/kakao/kakao.go @@ -118,6 +118,9 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { ThumbnailImage string `json:"thumbnail_image"` ProfileImage string `json:"profile_image"` } `json:"properties"` + KakaoAccount struct { + Email string `json:"email"` + } `json:"kakao_account"` }{} if err = json.NewDecoder(bytes.NewReader(bits)).Decode(&u); err != nil { @@ -129,6 +132,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { user.NickName = u.Properties.Nickname user.AvatarURL = u.Properties.ProfileImage user.UserID = id + user.Email = u.KakaoAccount.Email return user, err }