Commit 7f1c651
fix(mcp): clear OAuth tokens on server revival; clear popup intervals on unmount
- POST upsert: when reviving a soft-deleted server, drop any prior
mcpServerOauth rows so stale tokens never silently carry over.
- mcp.tsx: track the popup-closed setInterval per server in a ref and
clear it on component unmount to avoid leaked timers.
- client.ts: don't log OAuth-redirect/Unauthorized as connect errors;
these are expected control flow during the auth bootstrap.
- Use toError() for error message extraction.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 20fb108 commit 7f1c651
4 files changed
Lines changed: 37 additions & 16 deletions
File tree
- apps/sim
- app
- api/mcp/servers
- workspace/[workspaceId]/settings/components/mcp
- components/mcp-server-form-modal
- lib/mcp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
| 169 | + | |
169 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
170 | 176 | | |
171 | | - | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
559 | | - | |
560 | | - | |
| 560 | + | |
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
622 | | - | |
| 621 | + | |
623 | 622 | | |
624 | 623 | | |
625 | 624 | | |
| |||
Lines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
| |||
218 | 228 | | |
219 | 229 | | |
220 | 230 | | |
221 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
222 | 237 | | |
223 | 238 | | |
224 | 239 | | |
225 | 240 | | |
226 | 241 | | |
| 242 | + | |
227 | 243 | | |
228 | 244 | | |
229 | 245 | | |
| |||
232 | 248 | | |
233 | 249 | | |
234 | 250 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 251 | + | |
239 | 252 | | |
| 253 | + | |
240 | 254 | | |
241 | 255 | | |
242 | 256 | | |
243 | | - | |
| 257 | + | |
244 | 258 | | |
245 | 259 | | |
246 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
143 | | - | |
144 | 143 | | |
145 | | - | |
146 | 144 | | |
| 145 | + | |
147 | 146 | | |
148 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
0 commit comments