File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
services/backend/src/routes/mcp/installations Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -333,11 +333,19 @@ export default async function oauthCallbackRoute(server: FastifyInstance) {
333333 } )
334334 . where ( eq ( mcpServerInstances . installation_id , flow . installation_id ! ) ) ;
335335
336- // Update installation OAuth pending flag
336+ // Update installation OAuth config + pending flag
337+ // Re-auth performs new DCR registration, so oauth_client_id/secret
338+ // must be updated for the token refresh cron job to work correctly
337339 await db
338340 . update ( mcpServerInstallations )
339341 . set ( {
340- oauth_pending : false
342+ oauth_pending : false ,
343+ oauth_client_id : flow . oauth_client_id ,
344+ oauth_client_secret : flow . oauth_client_secret ,
345+ oauth_provider_id : flow . oauth_provider_id || null ,
346+ oauth_token_endpoint : flow . oauth_token_endpoint ,
347+ oauth_token_endpoint_auth_method : flow . oauth_token_endpoint_auth_method ,
348+ updated_at : new Date ( )
341349 } )
342350 . where ( eq ( mcpServerInstallations . id , flow . installation_id ! ) ) ;
343351
You can’t perform that action at this time.
0 commit comments