This commit is contained in:
邹宗楠
2022-10-17 14:06:23 +08:00
parent 0695aa132c
commit 53fe97cbc1
49 changed files with 78 additions and 225 deletions

View File

@@ -116,7 +116,6 @@ func (c *Auth2Controller) TiktokDecrypt() {
// @router /Login [post]
func (c *Auth2Controller) Login() {
c.callLogin(func(params *tAuth2LoginParams) (retVal interface{}, errCode string, err error) {
globals.SugarLogger.Debug("params.AuthType==============", params.AuthType)
if params.AuthType == auth2.AuthTypeMobile {
params.AuthIDType = auth2.UserIDMobile
} else if params.AuthType == auth2.AuthTypeEmail {
@@ -136,7 +135,6 @@ func (c *Auth2Controller) Login() {
ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request)
globals.SugarLogger.Debug("params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret==============", params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret)
authInfo, err := auth2.Login(ctx, params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret)
globals.SugarLogger.Debug("authInfo==============", authInfo)
// TODO 兼容没有取到authid2的错误
if err == nil && authInfo.AuthBindInfo != nil {
if authInfo.AuthBindInfo.AuthID2 == "" {
@@ -348,7 +346,6 @@ func (c *Auth2Controller) AddAuthBindWithMobile() {
if err != nil {
return retVal, "", err
}
globals.SugarLogger.Debug("打印newAuthInfo==============", newAuthInfo)
err = auth2.AddAuthBindWithMobile(newAuthInfo, params.Mobile)
return retVal, "", err
})