perf: oidc支持使用第三方昵称或账号作为certd用户的用户名

This commit is contained in:
xiaojunnuo
2025-12-15 00:19:55 +08:00
parent 6f186932cc
commit b6fea0c856
2 changed files with 2 additions and 2 deletions
@@ -169,7 +169,7 @@ export class ConnectController extends BaseController {
const userInfo = validationValue.userInfo;
const oauthType = validationValue.type;
let newUser = new UserEntity()
newUser.username = `${oauthType}_${userInfo.nickName}_${simpleNanoId(6)}`;
newUser.username = `${userInfo.nickName}_${simpleNanoId(6)}_${oauthType}`;
newUser.avatar = userInfo.avatar;
newUser.nickName = userInfo.nickName || simpleNanoId(6);