Skip to content

fix: refresh DCR provider client on replace#345

Merged
beubax merged 3 commits into
mainfrom
bugfix/dcr-provider-replace
May 28, 2026
Merged

fix: refresh DCR provider client on replace#345
beubax merged 3 commits into
mainfrom
bugfix/dcr-provider-replace

Conversation

@ankitranjan7
Copy link
Copy Markdown
Collaborator

Description

Fixes DCR provider replacement from the UI by clearing the existing dynamically registered client when a DCR provider is replaced without manual client credentials. The UI now handles DCR replacements with no input fields immediately, instead of redirecting to an empty input form.

Motivation and Context

For DCR OAuth providers like Notion DCR, clicking Replace did not actually replace the stored client because there are no manual client_id / client_secret fields to submit. The existing provider client was preserved, so no change was detected and the old dynamic client kept being reused.

With this change, Replace revokes existing connections and clears the saved DCR client so the next login performs dynamic client registration again.

How Has This Been Tested?

  • uv run pytest
  • uv run ruff check src/ tests/
  • uv run ty check src/
  • uv run pre-commit run --all-files

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.

@ankitranjan7 ankitranjan7 requested a review from beubax May 27, 2026 13:10
Refactor existing_provider_client check and input_fields assignment.
@beubax beubax merged commit 9af604d into main May 28, 2026
4 checks passed
@beubax beubax deleted the bugfix/dcr-provider-replace branch May 28, 2026 06:48
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