From a0438230453720fcb120f9499c580eb3197952f0 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Sun, 10 Sep 2023 23:58:17 +0800 Subject: [PATCH] fix --- server/auth/internal/logic/usergoogleloginlogic.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/auth/internal/logic/usergoogleloginlogic.go b/server/auth/internal/logic/usergoogleloginlogic.go index a16dd503..c9808571 100644 --- a/server/auth/internal/logic/usergoogleloginlogic.go +++ b/server/auth/internal/logic/usergoogleloginlogic.go @@ -104,7 +104,6 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us }, } - l.defaultEmail = gemail l.isRegistered = false token, err := l.svcCtx.OAuthTokenManger.Encrypt(l.registerInfo) if err != nil { @@ -112,7 +111,7 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us return resp.SetStatus(basic.CodeOAuthRegisterTokenErr) } l.registerToken = token - + l.defaultEmail = gemail return resp.SetStatus(basic.CodeOK) } @@ -143,7 +142,7 @@ func (l *UserGoogleLoginLogic) AfterLogic(w http.ResponseWriter, r *http.Request l.token, l.isRegistered, l.registerToken, - l.registerInfo.Email, + l.defaultEmail, ) html := fmt.Sprintf(`