Skip to content

Commit 00c220a

Browse files
fix(sso): increase SSO timeout (#7367)
## 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 --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: nkomonen-amazon <nkomonen@amazon.com>
1 parent 33ba274 commit 00c220a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/auth/sso/clients.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { StandardRetryStrategy, defaultRetryDecider } from '@smithy/middleware-r
3636
import { AuthenticationFlow } from './model'
3737
import { toSnakeCase } from '../../shared/utilities/textUtilities'
3838
import { getUserAgent, withTelemetryContext } from '../../shared/telemetry/util'
39+
import { oneSecond } from '../../shared/datetime'
3940

4041
export class OidcClient {
4142
public constructor(
@@ -124,7 +125,9 @@ export class OidcClient {
124125
requestHandler: {
125126
// This field may have a bug: https://github.com/aws/aws-sdk-js-v3/issues/6271
126127
// If the bug is real but is fixed, then we can probably remove this field and just have no timeout by default
127-
requestTimeout: 5000,
128+
//
129+
// Also, we bump this higher due to ticket V1761315147, so that SSO does not timeout
130+
requestTimeout: oneSecond * 12,
128131
},
129132
})
130133

0 commit comments

Comments
 (0)