- set correct authIDType when calling auth2.Login
This commit is contained in:
@@ -120,9 +120,9 @@ func CreateAuthInfo(user IUser, authBindInfo *model.AuthBind, userData interface
|
||||
UserData: userData,
|
||||
}
|
||||
if user != nil {
|
||||
globals.SugarLogger.Debugf("CreateAuthInfo id:%s, id2:%s, authBindInfo:%s, authInfo:%s", authInfo.GetID(), authInfo.GetID2(), authInfo.GetMobile(), utils.Format4Output(authBindInfo, true), utils.Format4Output(authInfo, true))
|
||||
globals.SugarLogger.Debugf("CreateAuthInfo id:%s, id2:%s, authInfo:%s", authInfo.GetID(), authInfo.GetID2(), authInfo.GetMobile(), utils.Format4Output(authInfo, true))
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("CreateAuthInfo authBindInfo:%s, authInfo:%s", utils.Format4Output(authBindInfo, true), utils.Format4Output(authInfo, true))
|
||||
globals.SugarLogger.Debugf("CreateAuthInfo authInfo:%s", utils.Format4Output(authInfo, true))
|
||||
}
|
||||
SetUserInfo(token, authInfo, DefTokenDuration)
|
||||
return authInfo
|
||||
@@ -163,6 +163,8 @@ func SendVerifyCode(authToken, captchaID, captchaValue, authID string) (err erro
|
||||
}
|
||||
|
||||
// 账号密码时:authIDType可能是:UserIDID,UserIDID2,UserIDMobile,UserIDEmail,authSecret是密码的sha1
|
||||
// mobile或email登录时,authIDType必须相应为UserIDMobile,UserIDEmail
|
||||
// 其它登录时authIDType无用
|
||||
// 邮箱时(如果允许):authIDType是:UserIDEmail,authSecret是验证码的sha1
|
||||
// 手机时(如果允许):authIDType是:UserIDMobile,authSecret是验证码的sha1
|
||||
// 公众号登录:authIDTypeD是UserIDEmpty,authSecret是code(这个函数是被微信的回调调用,不是直接被客户端调用)
|
||||
|
||||
Reference in New Issue
Block a user