From d33d4b7f0296bcec024b147dbb124ee0839d2154 Mon Sep 17 00:00:00 2001 From: Vui Lam Date: Tue, 8 Oct 2024 17:14:08 -0700 Subject: [PATCH] Update the cert map on successful non interactive login Signed-off-by: Vui Lam --- pkg/auth/common/login_handler.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/auth/common/login_handler.go b/pkg/auth/common/login_handler.go index 9cf1f34f9..2331ac15d 100644 --- a/pkg/auth/common/login_handler.go +++ b/pkg/auth/common/login_handler.go @@ -182,6 +182,11 @@ func (h *TanzuLoginHandler) DoLogin() (*Token, error) { if h.refreshToken != "" { token, err = h.getTokenWithRefreshToken() if err == nil || h.suppressInteractive { + // non interactive login mode should update the cert map as well + // before returning. + if err == nil && h.suppressInteractive { + h.updateCertMap() + } return token, err } }