refactor: 删除find_user_by_oidc_sub中未使用的raw username分支,避免误导

This commit is contained in:
Your Name 2026-04-16 10:06:48 +08:00
parent 90de80600d
commit 5d9aa72e74

View File

@ -491,11 +491,6 @@ async def find_user_by_oidc_sub(db, sub: str) -> User | None:
logger.warning(f"Multiple legacy OIDC users matched for sub={sub}, use earliest id={legacy_users[0].id}")
return legacy_users[0]
# 方法3: 如果启用了 use_raw_username尝试通过 user_id 的原始值找到用户(需要先从用户信息中获取 username
if oidc_config.use_raw_username:
# 注意:这里无法直接从 sub 获取 username需要在调用处处理
pass
return None