diff --git a/business/auth2/authprovider/mobile/mobile.go b/business/auth2/authprovider/mobile/mobile.go index 29e6a3f62..bf13cedcc 100644 --- a/business/auth2/authprovider/mobile/mobile.go +++ b/business/auth2/authprovider/mobile/mobile.go @@ -7,7 +7,6 @@ import ( "git.rosy.net.cn/jx-callback/business/auth2" "git.rosy.net.cn/jx-callback/business/auth2/authprovider" "git.rosy.net.cn/jx-callback/globals" - "git.rosy.net.cn/jx-callback/globals/api" "github.com/KenmyZhang/aliyun-communicate" ) @@ -52,14 +51,8 @@ func (a *Auther) VerifySecret(mobileNumber, code string) (authBindEx *auth2.Auth globals.SugarLogger.Debugf("VerifySecret mobileNumber:%s, code:%s", mobileNumber, code) err = ErrVerifyCodeIsWrong - if auth2.TestMobileMap[mobileNumber] == 1 && code == TestVerifyCode { + if (auth2.TestMobileMap[mobileNumber] == 1 && code == TestVerifyCode) || a.VerifyCode(mobileNumber, code) { err = nil - } else { - if value := api.Cacher.Get(mobileNumber); value != nil { - if a.VerifyCode(mobileNumber, code) { - err = nil - } - } } return nil, err }