Revert "Session에 email도 저장해둔다. 필요할때 꺼내줄 api만들 예정"
This reverts commit 2165a4400b.
This commit is contained in:
@ -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
|
||||
|
||||
@ -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{}
|
||||
|
||||
@ -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{
|
||||
|
||||
@ -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.")
|
||||
|
||||
@ -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.")
|
||||
|
||||
@ -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{}
|
||||
|
||||
@ -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{}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user