This commit is contained in:
richboo111
2022-08-12 09:54:38 +08:00
parent 37b874fb1e
commit addcd9eb72

View File

@@ -290,6 +290,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string
authInfo = createAuthInfo(user, authBindEx)
globals.SugarLogger.Debug("输出authInfo", authInfo)
if user != nil && user.GetID() != "" {
globals.SugarLogger.Debug("我进入到user != nil && user.GetID()")
userProvider.UpdateLastLogin(user.GetID(), authType, ctx.GetRealRemoteIP())
}
//如果是小程序
@@ -391,6 +392,7 @@ func AddAuthBind(user IUser, newAuthInfo *AuthInfo) (err error) {
} else {
if handler := authers[newAuthInfo.AuthBindInfo.Type]; handler != nil {
newAuthInfo.AuthBindInfo.UserID = user.GetID()
globals.SugarLogger.Debug("进入AddAuthBind获取userID", newAuthInfo.AuthBindInfo.UserID)
handler.UnbindAuth(user.GetID(), newAuthInfo.GetAuthType(), newAuthInfo.GetAuthTypeID(), user.GetName())
err = handler.AddAuthBind(newAuthInfo.AuthBindInfo, user.GetName())
} else {