From 966cf96ec25223add830901622bb02935e1008ba Mon Sep 17 00:00:00 2001 From: Andre Ziviani Date: Wed, 26 Jun 2024 19:02:42 -0300 Subject: [PATCH] fix: Also ignore OIDC cache when ignoring role credentials cache --- internal/sso/login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sso/login.go b/internal/sso/login.go index 0b8b353..bb705cf 100644 --- a/internal/sso/login.go +++ b/internal/sso/login.go @@ -110,7 +110,7 @@ func (p *Login) GetCredentials(ctx context.Context) (*aws.Credentials, error) { credstore := securestorage.NewSecureSSOTokenStorage() cachedToken := credstore.GetValidSSOToken(ssoTokenKey) - if cachedToken == nil { + if p.NoCache || cachedToken == nil { newSSOToken, err := awsprofile.SSODeviceCodeFlowFromStartUrl(ctx, cfg, startURL, profile.Name, p.Url) if err != nil { return &aws.Credentials{}, err