mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
fix: 修复二次认证登录进入错误账号的bug
This commit is contained in:
@@ -176,7 +176,11 @@ export class LoginService {
|
||||
}
|
||||
await this.twoFactorService.verifyAuthenticatorCode(userId, req.verifyCode)
|
||||
|
||||
return this.generateToken(await this.userService.findOne(userId))
|
||||
const user = await this.userService.info(userId);
|
||||
if (!user) {
|
||||
throw new AuthException('用户不存在')
|
||||
}
|
||||
return this.generateToken(user)
|
||||
}
|
||||
|
||||
private async onLoginSuccess(info: UserEntity) {
|
||||
|
||||
Reference in New Issue
Block a user