From 65ccfcb84e6e8a1e01e0141b7a467dd6f32c6f63 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Sun, 10 Sep 2023 23:50:42 +0800 Subject: [PATCH] fix --- server/auth/internal/logic/usergoogleloginlogic.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/auth/internal/logic/usergoogleloginlogic.go b/server/auth/internal/logic/usergoogleloginlogic.go index 56a8e498..b12b9ebb 100644 --- a/server/auth/internal/logic/usergoogleloginlogic.go +++ b/server/auth/internal/logic/usergoogleloginlogic.go @@ -89,10 +89,11 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us logx.Error(err) return resp.SetStatus(basic.CodeOK) } - + gemail := gresult.Get("email").String() l.registerInfo = &auth.RegisterToken{ Password: base64.RawURLEncoding.EncodeToString(nonce), Platform: string(auth.PLATFORM_GOOGLE), + Email: gemail, OperateType: auth.OpTypeRegister, TraceId: uuid.NewString(), CreateAt: time.Now().UTC(), @@ -110,7 +111,7 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us return resp.SetStatus(basic.CodeOAuthRegisterTokenErr) } l.registerToken = token - l.defaultEmail = gresult.Get("email").String() + l.defaultEmail = gemail return resp.SetStatus(basic.CodeOK) }