fix(kiro): 导入时将获取到的 email 写回 auth_config 以确保持久化

This commit is contained in:
fawney19
2026-02-09 03:01:13 +08:00
parent 35b57542d1
commit 3e1a046140

View File

@@ -1243,6 +1243,10 @@ async def import_refresh_token(
email = await _fetch_kiro_email(new_cfg.to_dict(), proxy_config=proxy_config)
name = email or f"账号_{int(time.time())}"
# 将获取到的 email 写回 auth_config确保持久化
if email and not new_cfg.email:
new_cfg.email = email
new_key = _create_oauth_key(
db,
provider_id=provider_id,
@@ -1739,6 +1743,10 @@ async def _batch_import_kiro_internal(
email = await _fetch_kiro_email(new_cfg.to_dict(), proxy_config=proxy_config)
name = email or f"账号_{int(time.time())}"
# 将获取到的 email 写回 auth_config确保持久化
if email and not new_cfg.email:
new_cfg.email = email
new_key = _create_oauth_key(
db,
provider_id=provider_id,