Skip to content

Commit

Permalink
sts: Send the refresh token in the login redirect URL (#2025)
Browse files Browse the repository at this point in the history
Co-authored-by: Anis Eleuch <[email protected]>
  • Loading branch information
vadmeste and Anis Eleuch authored Dec 2, 2024
1 parent 3af356c commit de1893f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/credentials/sts_web_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit de1893f

Please sign in to comment.