mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-07 00:15:23 +02:00
fix: set reusedStoredClient before createFlow in joined-flow path
When joining a PENDING flow, reusedStoredClient was only set on the success return but not before the await. If createFlow throws (e.g. invalid_client during token exchange), the outer catch returns the local variable which was still false, skipping stale-client cleanup.
This commit is contained in:
parent
a78b8db3e8
commit
6fcb0f57eb
1 changed files with 1 additions and 0 deletions
|
|
@ -596,6 +596,7 @@ export class MCPConnectionFactory {
|
|||
await this.oauthStart(storedAuthUrl);
|
||||
}
|
||||
|
||||
reusedStoredClient = flowMeta?.reusedStoredClient === true;
|
||||
const tokens = await this.flowManager.createFlow(flowId, 'mcp_oauth', {}, this.signal);
|
||||
if (typeof this.oauthEnd === 'function') {
|
||||
await this.oauthEnd();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue