Skip to content

Commit 1b9b1f1

Browse files
authored
Re-register DCR clients when the flow redirect URI changes (#1443)
* test: repro DCR client reuse across a changed redirect URI * Re-register DCR clients when the flow redirect URI changes
1 parent 99c808f commit 1b9b1f1

14 files changed

Lines changed: 2414 additions & 11 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@executor-js/sdk": patch
3+
---
4+
5+
Re-register a dynamically registered OAuth client when the configured callback URL changes instead of reusing the stale registration. DCR clients now persist the redirect URI they registered with the authorization server (`oauth_client.origin_redirect_uri`), and the per-issuer reuse lookup compares it against the current flow callback — a mismatch (for example after a sandbox recreation moved the callback origin) mints a fresh client rather than pairing the old registration with the new callback, which strict providers reject with `invalid_redirect_uri`. The stale client row is left in place so existing connections keep refreshing through it; clients persisted before this release have no stored redirect URI and continue to be reused as before.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "oauth_client" ADD COLUMN "origin_redirect_uri" text;

0 commit comments

Comments
 (0)