From 5f2ebac475e4ffbf336b4dfacdadeb0f5c4ff1d8 Mon Sep 17 00:00:00 2001 From: nkomonen-amazon Date: Thu, 22 May 2025 19:17:07 -0400 Subject: [PATCH] fix(sso): increase SSO timeout Problem: In ticket V1761315147 it was being reported that createToken could take 9 seconds. This would mean that the SSO client API request would time out Solution: Bump the timeout to 12 seconds as specified in V1761315147 Signed-off-by: nkomonen-amazon --- packages/core/src/auth/sso/clients.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/auth/sso/clients.ts b/packages/core/src/auth/sso/clients.ts index e050bdc793e..e921cb7856e 100644 --- a/packages/core/src/auth/sso/clients.ts +++ b/packages/core/src/auth/sso/clients.ts @@ -36,6 +36,7 @@ import { StandardRetryStrategy, defaultRetryDecider } from '@smithy/middleware-r import { AuthenticationFlow } from './model' import { toSnakeCase } from '../../shared/utilities/textUtilities' import { getUserAgent, withTelemetryContext } from '../../shared/telemetry/util' +import { oneSecond } from '../../shared/datetime' export class OidcClient { public constructor( @@ -124,7 +125,9 @@ export class OidcClient { requestHandler: { // This field may have a bug: https://github.com/aws/aws-sdk-js-v3/issues/6271 // If the bug is real but is fixed, then we can probably remove this field and just have no timeout by default - requestTimeout: 5000, + // + // Also, we bump this higher due to ticket V1761315147, so that SSO does not timeout + requestTimeout: oneSecond * 12, }, })