dd
This commit is contained in:
@@ -160,6 +160,7 @@ func getFixedTokenName(token string) *AuthInfo {
|
||||
|
||||
func createAuthInfo(user IUser, authBindInfo *AuthBindEx) (authInfo *AuthInfo) {
|
||||
token, tokenType := createToken(user, authBindInfo)
|
||||
globals.SugarLogger.Debug("token,tokenType============", token, tokenType)
|
||||
expireDuration := DefTokenDuration
|
||||
authInfo = &AuthInfo{
|
||||
AuthBindInfo: authBindInfo,
|
||||
@@ -272,9 +273,12 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
|
||||
// if user != nil {
|
||||
// authBindEx.UserID = user.GetID()
|
||||
// }
|
||||
if user2 := userProvider.GetUser(authBindEx.UserHint.Email, UserIDMobile); user2 != nil {
|
||||
if user2 := userProvider.GetUser(authBindEx.AuthID2, "auth_id2"); err != nil {
|
||||
user = user2
|
||||
}
|
||||
//if user2 := userProvider.GetUser(authBindEx.UserHint.Email, UserIDMobile); user2 != nil {
|
||||
// user = user2
|
||||
//}
|
||||
globals.SugarLogger.Debug("user检测1=============", user)
|
||||
} else if authBindEx.UserID != "" {
|
||||
user = userProvider.GetUser(authBindEx.UserID, UserIDID)
|
||||
|
||||
@@ -30,7 +30,7 @@ func (a *QRCodeAuther) VerifySecret(dummy, code string) (authBindEx *auth2.AuthB
|
||||
if authBindEx, err = a.UnionFindAuthBind(AuthTypeQRCode, api.DingDingQRCodeAPI.GetAppID(), []string{AuthTypeStaff, AuthTypeQRCode}, userQRInfo.OpenID, userQRInfo.UnionID, userQRInfo); err == nil {
|
||||
authBindEx.UserHint = &auth2.UserBasic{
|
||||
Name: userQRInfo.Nickname,
|
||||
//UserID: userQRInfo.,
|
||||
//UserID: userQR Info.,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user