Skip to content

Commit

Permalink
fix: Also ignore OIDC cache when ignoring role credentials cache
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreZiviani committed Jun 26, 2024
1 parent 333251e commit 966cf96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/sso/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 966cf96

Please sign in to comment.