({ verbose = false }: LogoutOptions = {})
| 10 | } |
| 11 | |
| 12 | export 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 | } |
no test coverage detected