Reduce OAuth state timeout from 10 to 5 minutes for improved security
- Update MCP OAuth state expiration in connection.ts - Update OpenRouter OAuth state expiration in oauth-provider.ts - Addresses security review feedback to minimize window for potential attacks
This commit is contained in:
parent
8ae2da590f
commit
c9feacd763
1 changed files with 161 additions and 32 deletions
|
|
@ -162,7 +162,7 @@ class MCPOAuthProvider implements OAuthClientProvider {
|
|||
const oauthState: MCPOAuthState = {
|
||||
codeVerifier,
|
||||
state: this.generateRandomString(16),
|
||||
expiresAt: Date.now() + (10 * 60 * 1000), // 10 minutes
|
||||
expiresAt: Date.now() + (5 * 60 * 1000), // 5 minutes
|
||||
};
|
||||
localStorage.setItem(`mcp_oauth_state_${this.connectionId}`, JSON.stringify(oauthState));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue