From de1893f9cd38d67564fd9d04af6fcf0ea88f9035 Mon Sep 17 00:00:00 2001 From: Anis Eleuch Date: Mon, 2 Dec 2024 11:15:12 +0100 Subject: [PATCH] sts: Send the refresh token in the login redirect URL (#2025) Co-authored-by: Anis Eleuch --- pkg/credentials/sts_web_identity.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/credentials/sts_web_identity.go b/pkg/credentials/sts_web_identity.go index 787f0a38d..8c06bac60 100644 --- a/pkg/credentials/sts_web_identity.go +++ b/pkg/credentials/sts_web_identity.go @@ -162,6 +162,10 @@ func getWebIdentityCredentials(clnt *http.Client, endpoint, roleARN, roleSession // Usually set when server is using extended userInfo endpoint. v.Set("WebIdentityAccessToken", idToken.AccessToken) } + if idToken.RefreshToken != "" { + // Usually set when server is using extended userInfo endpoint. + v.Set("WebIdentityRefreshToken", idToken.RefreshToken) + } if idToken.Expiry > 0 { v.Set("DurationSeconds", fmt.Sprintf("%d", idToken.Expiry)) }