mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 07:20:24 +08:00
fix: 修复记录ip与归属地信息问题
This commit is contained in:
@@ -193,7 +193,7 @@ func (a *Account) OtpVerify(rc *req.Ctx) {
|
||||
|
||||
la := &entity.Account{Username: otpInfo.Username}
|
||||
la.Id = accountId
|
||||
go saveLogin(a.AccountApp, a.MsgApp, la, rc.GinCtx.ClientIP())
|
||||
go saveLogin(a.AccountApp, a.MsgApp, la, getIpAndRegion(rc))
|
||||
|
||||
cache.Del(tokenKey)
|
||||
rc.ResData = accessToken
|
||||
|
||||
@@ -186,7 +186,7 @@ func (a *Auth) OAuth2Callback(rc *req.Ctx) {
|
||||
accessToken = otpToken
|
||||
} else {
|
||||
// 保存登录消息
|
||||
go saveLogin(a.AccountApp, a.MsgApp, account, rc.GinCtx.ClientIP())
|
||||
go saveLogin(a.AccountApp, a.MsgApp, account, getIpAndRegion(rc))
|
||||
}
|
||||
// 赋值otp状态
|
||||
res["action"] = "oauthLogin"
|
||||
|
||||
Reference in New Issue
Block a user