Skip to content
4 changes: 0 additions & 4 deletions src/google/adk/auth/credential_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ async def _load_existing_credential(
if credential:
return credential

# Check if we have a cached exchanged credential
if self._auth_config.exchanged_auth_credential:
return self._auth_config.exchanged_auth_credential

return None

async def _load_from_credential_service(
Expand Down
16 changes: 0 additions & 16 deletions tests/unittests/auth/test_credential_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,6 @@ async def test_load_auth_credentials_no_credential(self):

assert result is None

@pytest.mark.asyncio
async def test_load_existing_credential_already_exchanged(self):
"""Test _load_existing_credential when credential is already exchanged."""
auth_config = Mock(spec=AuthConfig)
mock_credential = Mock(spec=AuthCredential)
auth_config.exchanged_auth_credential = mock_credential

callback_context = Mock()

manager = CredentialManager(auth_config)
manager._load_from_credential_service = AsyncMock(return_value=None)

result = await manager._load_existing_credential(callback_context)

assert result == mock_credential

@pytest.mark.asyncio
async def test_load_existing_credential_with_credential_service(self):
"""Test _load_existing_credential with credential service."""
Expand Down