From f303a04322ddcb0f22e57fb0583717d74c821726 Mon Sep 17 00:00:00 2001 From: airano Date: Wed, 18 Feb 2026 15:43:05 +0330 Subject: [PATCH] fix(auth): fix dashboard login with project API keys validate_key() requires project_id argument but was called without it in dashboard auth. Fixed by passing skip_project_check=True. Co-Authored-By: Claude Opus 4.6 --- core/dashboard/auth.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/dashboard/auth.py b/core/dashboard/auth.py index 4cd8b5a..753b39c 100644 --- a/core/dashboard/auth.py +++ b/core/dashboard/auth.py @@ -101,9 +101,13 @@ class DashboardAuth: api_key_manager = get_api_key_manager() - key_info = api_key_manager.validate_key(api_key) - if key_info and "admin" in key_info.get("scope", "").split(): - return True, "api_key", key_info.get("key_id") + # Dashboard login is not project-specific, so skip project check + # and require admin scope + key_id = api_key_manager.validate_key( + api_key, project_id="*", required_scope="admin", skip_project_check=True + ) + if key_id: + return True, "api_key", key_id except Exception as e: logger.warning(f"Error checking API key: {e}")