From bc82cb123ccf5f66612532bf3ca3e04784c9236a Mon Sep 17 00:00:00 2001 From: rehjinh Date: Tue, 9 Jan 2024 15:31:15 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"Session=EC=97=90=20email=EB=8F=84=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=ED=95=B4=EB=91=94=EB=8B=A4.=20=ED=95=84?= =?UTF-8?q?=EC=9A=94=ED=95=A0=EB=95=8C=20=EA=BA=BC=EB=82=B4=EC=A4=84=20api?= =?UTF-8?q?=EB=A7=8C=EB=93=A4=20=EC=98=88=EC=A0=95"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2165a4400bf01ae1e9bcb0ae7c6cebc7f8a2d78a. --- core/maingate.go | 10 ---------- core/platformapple.go | 1 - core/platformfirebaseauth.go | 1 - core/platformgoogle.go | 2 -- core/platformmicrosoft.go | 2 -- core/platformsteam.go | 1 - core/platformtwitter.go | 1 - core/service.go | 1 - 8 files changed, 19 deletions(-) diff --git a/core/maingate.go b/core/maingate.go index d55b2e3..7131a91 100644 --- a/core/maingate.go +++ b/core/maingate.go @@ -587,7 +587,6 @@ func (mg *Maingate) setUserToken(info usertokeninfo) error { "lastupdate": time.Now().Unix(), "accesstoken": info.accesstoken, "accesstoken_expire_time": info.accesstoken_expire_time, - "email": info.email, }, }, options.Update().SetUpsert(true)) return logger.ErrorWithCallStack(err) @@ -640,11 +639,6 @@ func (mg *Maingate) getUserTokenWithCheck(platform string, userid string, brinfo info.accesstoken_expire_time = accesstoken_expire_time.(int64) } - email := found["email"] - if email != nil { - info.email = email.(string) - } - return info, nil } @@ -682,10 +676,6 @@ func (mg *Maingate) updateUserinfo(info usertokeninfo) (bool, string, string) { return false, "", "" } - if !(strings.HasPrefix("email", "__dummy_") && strings.HasSuffix("email", "temp__")) { - info.email = email - } - mg.setUserToken(info) return success, userid, email diff --git a/core/platformapple.go b/core/platformapple.go index c8a0370..dc9daa9 100644 --- a/core/platformapple.go +++ b/core/platformapple.go @@ -255,7 +255,6 @@ func (mg *Maingate) platform_apple_authorize_result(w http.ResponseWriter, r *ht info.userid = userid info.token = resp.RefreshToken info.brinfo = brinfo - info.email = email mg.setUserToken(info) params := url.Values{} diff --git a/core/platformfirebaseauth.go b/core/platformfirebaseauth.go index abc2d46..5741818 100644 --- a/core/platformfirebaseauth.go +++ b/core/platformfirebaseauth.go @@ -208,7 +208,6 @@ func (mg *Maingate) platform_firebaseauth_authorize_raw(w http.ResponseWriter, b info.brinfo = brinfo info.accesstoken = "" info.accesstoken_expire_time = acceestoken_expire_time - info.email = email mg.setUserToken(info) mg.mongoClient.Delete(CollectionFirebaseUserInfo, bson.M{ diff --git a/core/platformgoogle.go b/core/platformgoogle.go index 3a58f5a..10d6013 100644 --- a/core/platformgoogle.go +++ b/core/platformgoogle.go @@ -262,7 +262,6 @@ func (mg *Maingate) platform_google_authorize_result(w http.ResponseWriter, r *h info.brinfo = brinfo info.accesstoken = respReferesh.AccessToken info.accesstoken_expire_time = acceestoken_expire_time - info.email = email mg.setUserToken(info) params := url.Values{} @@ -317,7 +316,6 @@ func (mg *Maingate) platform_google_getuserinfo(info usertokeninfo) (bool, strin info.token = respReferesh.RefreshToken info.accesstoken = respReferesh.AccessToken info.accesstoken_expire_time = acceestoken_expire_time - info.email = email mg.setUserToken(info) //-- accesstoken 업데이트 } else { logger.Println("JWTparseCode fail.") diff --git a/core/platformmicrosoft.go b/core/platformmicrosoft.go index b444692..3375905 100644 --- a/core/platformmicrosoft.go +++ b/core/platformmicrosoft.go @@ -239,7 +239,6 @@ func (mg *Maingate) platform_microsoft_authorize_result(w http.ResponseWriter, r info.brinfo = brinfo info.accesstoken = respReferesh.AccessToken info.accesstoken_expire_time = acceestoken_expire_time - info.email = "" mg.setUserToken(info) params := url.Values{} @@ -296,7 +295,6 @@ func (mg *Maingate) platform_microsoft_getuserinfo(info usertokeninfo) (bool, st info.token = respReferesh.RefreshToken info.accesstoken = respReferesh.AccessToken info.accesstoken_expire_time = acceestoken_expire_time - info.email = "" mg.setUserToken(info) //-- accesstoken 업데이트 } else { logger.Println("JWTparseCode fail.") diff --git a/core/platformsteam.go b/core/platformsteam.go index 4c3b602..bcdd229 100644 --- a/core/platformsteam.go +++ b/core/platformsteam.go @@ -53,7 +53,6 @@ func (mg *Maingate) platform_steamsdk_authorize(w http.ResponseWriter, r *http.R info.brinfo = brinfo //info.accesstoken = respReferesh.AccessToken info.accesstoken_expire_time = acceestoken_expire_time - info.email = "" mg.setUserToken(info) params := url.Values{} diff --git a/core/platformtwitter.go b/core/platformtwitter.go index a10017a..58396c5 100644 --- a/core/platformtwitter.go +++ b/core/platformtwitter.go @@ -208,7 +208,6 @@ func (mg *Maingate) platform_twitter_authorize_result(w http.ResponseWriter, r * info.token = token info.secret = secret info.brinfo = brinfo - info.email = "" mg.setUserToken(info) params := url.Values{} diff --git a/core/service.go b/core/service.go index e0b911a..1389d95 100644 --- a/core/service.go +++ b/core/service.go @@ -63,7 +63,6 @@ type usertokeninfo struct { token string //refreshtoken secret string brinfo string - email string accesstoken string // microsoft only accesstoken_expire_time int64 // microsoft only }