From 08d21b76e2ba40d522673b963b3559b405dd3f50 Mon Sep 17 00:00:00 2001 From: FakerL Date: Mon, 5 Jan 2026 21:38:26 +0800 Subject: [PATCH] Update sdk/auth/filestore.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- sdk/auth/filestore.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sdk/auth/filestore.go b/sdk/auth/filestore.go index 772de9d6..3dd9f752 100644 --- a/sdk/auth/filestore.go +++ b/sdk/auth/filestore.go @@ -300,13 +300,10 @@ func metadataEqualIgnoringTimestamps(a, b []byte, provider string) bool { // - timestamp, expired, expires_in, last_refresh: time-related fields that change on refresh ignoredFields := []string{"timestamp", "expired", "expires_in", "last_refresh"} - // Providers that issue new access_token on every refresh and can re-fetch when needed. - // For these providers, we also ignore access_token to avoid unnecessary file writes. - providersIgnoringAccessToken := map[string]bool{ - "gemini": true, - "gemini-cli": true, - } - if providersIgnoringAccessToken[provider] { + // For providers that can re-fetch tokens when needed (e.g., Google OAuth), + // we ignore access_token to avoid unnecessary file writes. + switch provider { + case "gemini", "gemini-cli": ignoredFields = append(ignoredFields, "access_token") }