anythingmcp
anythingmcp copied to clipboard
Server-side dashboard sign-out and sign out of all devices
Signing out of the dashboard today only forgets the token in the browser: the token itself stays valid until it expires (24 hours). There is also no way for a user to end their sessions on other devices, short of changing the password.
Proposal:
POST /api/auth/logoutends the session that calls it: the token's id is recorded until the token would have expired, and dashboard routes and/mcprefuse it from then on. Connected AI apps and API keys are not affected.POST /api/auth/logout-allends every dashboard session of the user and every MCP sign-in made with the account (the same cutover a password change already applies). API keys keep working.- Dashboard tokens get a random
jti. - A JWT presented to
/mcpmust be an MCP access token or a dashboard token; other token types signed with the same secret are refused. The dashboard API requires the dashboard token marker. - Settings → Profile gets a "Sign out of all devices" button.
Schema change: one new table, revoked_dashboard_tokens (jti primary key, user_id with cascade delete, expires_at, created_at), additive only. Expired rows are removed when a new row is written.