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) }