tweak: hide MCP access token prefix (#33711)

This commit is contained in:
Aiden Cline 2026-06-25 20:32:36 -05:00 committed by GitHub
commit 0f272d931d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -708,7 +708,9 @@ export const McpDebugCommand = effectCmd({
prompts.log.info(`Auth status: ${getAuthStatusIcon(authStatus)} ${getAuthStatusText(authStatus)}`)
if (entry?.tokens) {
prompts.log.info(` Access token: ${entry.tokens.accessToken.substring(0, 20)}...`)
prompts.log.info(
` Access token: ${entry.tokens.accessToken.length > 8 ? `${entry.tokens.accessToken.slice(0, 4)}***${entry.tokens.accessToken.slice(-4)}` : "***"}`,
)
if (entry.tokens.expiresAt) {
const expiresDate = new Date(entry.tokens.expiresAt * 1000)
const isExpired = entry.tokens.expiresAt < Date.now() / 1000