This commit is contained in:
eson 2023-09-10 23:58:17 +08:00
parent 467cf3c5a3
commit a043823045

View File

@ -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(`