MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / logout

Function logout

apps/cli/src/commands/auth/logout.ts:12–27  ·  view source on GitHub ↗
({ verbose = false }: LogoutOptions = {})

Source from the content-addressed store, hash-verified

10}
11
12export async function logout({ verbose = false }: LogoutOptions = {}): Promise<LogoutResult> {
13 const wasLoggedIn = await hasToken()
14
15 if (!wasLoggedIn) {
16 console.log("No legacy Roo auth token stored.")
17 return { success: true, wasLoggedIn: false }
18 }
19
20 if (verbose) {
21 console.log(`[Auth] Removing credentials from ${getCredentialsPath()}`)
22 }
23
24 await clearToken()
25 console.log("✓ Removed stored legacy Roo auth token")
26 return { success: true, wasLoggedIn: true }
27}

Callers 2

index.tsFile · 0.85

Calls 4

hasTokenFunction · 0.85
getCredentialsPathFunction · 0.85
clearTokenFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected