mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
fix: 修复用户删除后,用相同的oauth授权登录报错用户不存在的问题
https://github.com/certd/certd/issues/603
This commit is contained in:
@@ -242,7 +242,9 @@ export class LoginService {
|
||||
}
|
||||
const info = await this.userService.findOne({id: oauthBound.userId});
|
||||
if (info == null) {
|
||||
throw new CommonException('用户不存在');
|
||||
// 用户已被删除,删除此oauth绑定
|
||||
await this.oauthBoundService.delete([oauthBound.id]);
|
||||
return null
|
||||
}
|
||||
return this.generateToken(info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user