Skip to content

Refactor OAuth implementation and enhance account linking features#2775

Open
hhhhsc701 wants to merge 24 commits intodevelopfrom
dev/oauth
Open

Refactor OAuth implementation and enhance account linking features#2775
hhhhsc701 wants to merge 24 commits intodevelopfrom
dev/oauth

Conversation

@hhhhsc701
Copy link
Copy Markdown

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

username = user_info["username"]

from utils.auth_utils import get_supabase_admin_client
from services.oauth_service import get_oauth_account_by_provider
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package import 风格建议统一,放文件头

if not result:
return False

session.delete(result)
Copy link
Copy Markdown
Contributor

@Jasonxia007 Jasonxia007 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当前数据库操作共识中,明确应使用软删除(delete_flag="Y")移除数据

session.query(UserOAuthAccount)
.filter(
UserOAuthAccount.provider == provider,
UserOAuthAccount.provider_user_id == provider_user_id,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

软删除时需添加delete_flag="Y"的筛选条件


logger = logging.getLogger(__name__)

_state_store: Dict[str, float] = {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全局字典会不会有内存过度膨胀的隐患?先前tenant_config_manager中也用过一回全局字典,结果导致一段时间生产环境nexent-config容器内存爆炸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants