wx注册错误
This commit is contained in:
@@ -116,6 +116,7 @@ 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 {
|
||||
@@ -133,14 +134,18 @@ func (c *Auth2Controller) Login() {
|
||||
params.AuthSecret = GetComposedCode2(&c.Controller, params.AuthSecret)
|
||||
}
|
||||
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 == "" {
|
||||
globals.SugarLogger.Debug("fgfggggggg")
|
||||
authInfo.AuthBindInfo.AuthID2 = authInfo.AuthBindInfo.AuthID
|
||||
}
|
||||
retVal = authInfo
|
||||
}
|
||||
globals.SugarLogger.Debug("retVal==============", retVal)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user