mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
🔌 feat: Revoke MCP OAuth Credentials (#9464)
* revocation metadata fields * store metadata * get client info and meta * revoke oauth tokens * delete flow * uninstall oauth mcp * revoke button * revoke oauth refactor, add comments, test * adjust for clarity * test deleteFlow * handle metadata type * no mutation * adjust for clarity * styling * restructure for clarity * move token-specific stuff * use mcpmanager's oauth servers * fix typo * fix addressing of oauth prop * log prefix * remove debug log
This commit is contained in:
parent
5667cc9702
commit
04c3a5a861
12 changed files with 725 additions and 6 deletions
|
|
@ -241,4 +241,19 @@ export class FlowStateManager<T = unknown> {
|
|||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a flow state
|
||||
*/
|
||||
async deleteFlow(flowId: string, type: string): Promise<boolean> {
|
||||
const flowKey = this.getFlowKey(flowId, type);
|
||||
try {
|
||||
await this.keyv.delete(flowKey);
|
||||
logger.debug(`[${flowKey}] Flow deleted`);
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.error(`[${flowKey}] Error deleting flow:`, error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue