Commit 253db5e
Enhance logout to clear MCP OAuth tokens and disconnect all servers
## Problem
The logout button only cleared inference provider authentication, leaving
MCP OAuth tokens and server connections active. Users remained authenticated
to MCP servers after logging out.
## Solution
- **Clear MCP OAuth tokens**: Remove OAuth tokens and state for all MCP connections
- **Disconnect all servers**: Remove all MCP server connections on logout
- **Complete cleanup**: Comprehensive logout that clears all authentication state
- **Enhanced confirmation**: Updated dialog to inform users about MCP disconnection
## Technical Implementation
- Added MCP context integration to access connections and removal methods
- Clear OAuth tokens from localStorage for each OAuth-enabled connection
- Remove all MCP servers to properly disconnect and clean up connections
- Maintained existing inference provider logout functionality
## User Experience
- ✅ **Complete logout**: All authentication state cleared (inference + MCP)
- ✅ **Clean slate**: No residual authentication data after logout
- ✅ **Clear communication**: User informed about full scope of logout action
- ✅ **Security**: No orphaned authentication tokens left behind
## Data Cleared on Logout
- Inference provider API keys and OAuth tokens
- MCP OAuth tokens and authentication state
- Model selection preferences
- All active MCP server connections
Note: Conversation history remains intact as it's stored separately from auth data.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent c726e63 commit 253db5e
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
24 | 41 | | |
25 | 42 | | |
26 | 43 | | |
| |||
0 commit comments