-
Notifications
You must be signed in to change notification settings - Fork 3.3k
OAuth provider configuration not properly deleted #7886
Copy link
Copy link
Closed
Description
Summary
When deleting the configuration for an OAuth provider (ChatGPT Codex, GitHub Copilot), the token is removed but the provider still shows as "configured".
Steps to Reproduce
- Configure ChatGPT Codex via OAuth (sign in with ChatGPT)
- Provider shows as "configured" ✓
- Click on ChatGPT Codex card to open configuration modal
- Click "Remove Configuration"
- Confirm deletion
- Provider still shows as "configured" ✗
Expected Behavior
After removing configuration, provider should show as "not configured" and allow reconfiguration.
Actual Behavior
Provider remains showing as "configured" despite the token being deleted.
Root Cause Analysis
The check_provider_configured function in crates/goose-server/src/routes/utils.rs checks for OAuth providers using a configured marker (e.g., chatgpt_codex_configured) instead of checking if the actual token exists:
// Special case: OAuth providers - check for configured marker
let has_oauth_key = metadata.config_keys.iter().any(|key| key.oauth_flow);
if has_oauth_key {
let configured_marker = format!("{}_configured", metadata.name);
if matches!(config.get_param::<bool>(&configured_marker), Ok(true)) {
return true;
}
}When deleting configuration:
- Token is removed (
CHATGPT_CODEX_TOKEN) - Configured marker is NOT removed (
chatgpt_codex_configured) - Provider still appears configured
Affected Components
ui/desktop/src/components/settings/providers/modal/ProviderConfiguationModal.tsx- Delete handler- Backend: Deletion needs to also remove configured marker for OAuth providers
Proposed Fix
Update the delete logic to also remove the configured marker when deleting OAuth provider configuration:
// In handleConfirmDelete
const configuredMarker = `${provider.name}_configured`;
await remove(configuredMarker, false); // Remove the markerImpact
Affects all OAuth providers:
- ChatGPT Codex
- GitHub Copilot
- Any future OAuth-based providers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels