This commit is contained in:
eson 2023-09-10 23:50:42 +08:00
parent 71352cc5b9
commit 65ccfcb84e

View File

@ -89,10 +89,11 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
logx.Error(err) logx.Error(err)
return resp.SetStatus(basic.CodeOK) return resp.SetStatus(basic.CodeOK)
} }
gemail := gresult.Get("email").String()
l.registerInfo = &auth.RegisterToken{ l.registerInfo = &auth.RegisterToken{
Password: base64.RawURLEncoding.EncodeToString(nonce), Password: base64.RawURLEncoding.EncodeToString(nonce),
Platform: string(auth.PLATFORM_GOOGLE), Platform: string(auth.PLATFORM_GOOGLE),
Email: gemail,
OperateType: auth.OpTypeRegister, OperateType: auth.OpTypeRegister,
TraceId: uuid.NewString(), TraceId: uuid.NewString(),
CreateAt: time.Now().UTC(), CreateAt: time.Now().UTC(),
@ -110,7 +111,7 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
return resp.SetStatus(basic.CodeOAuthRegisterTokenErr) return resp.SetStatus(basic.CodeOAuthRegisterTokenErr)
} }
l.registerToken = token l.registerToken = token
l.defaultEmail = gresult.Get("email").String() l.defaultEmail = gemail
return resp.SetStatus(basic.CodeOK) return resp.SetStatus(basic.CodeOK)
} }