From 1669f3593e420c36fcd5df16596007bdf325f557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Tue, 7 Nov 2023 12:16:15 +0000 Subject: [PATCH] [PM-3647] Change order of timeout set. (#6723) --- .../services/vault-timeout/vault-timeout-settings.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/common/src/services/vault-timeout/vault-timeout-settings.service.ts b/libs/common/src/services/vault-timeout/vault-timeout-settings.service.ts index f34983b910..9cd6442c89 100644 --- a/libs/common/src/services/vault-timeout/vault-timeout-settings.service.ts +++ b/libs/common/src/services/vault-timeout/vault-timeout-settings.service.ts @@ -26,8 +26,6 @@ export class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceA ) {} async setVaultTimeoutOptions(timeout: number, action: VaultTimeoutAction): Promise { - await this.stateService.setVaultTimeout(timeout); - // We swap these tokens from being on disk for lock actions, and in memory for logout actions // Get them here to set them to their new location after changing the timeout action and clearing if needed const token = await this.tokenService.getToken(); @@ -35,6 +33,8 @@ export class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceA const clientId = await this.tokenService.getClientId(); const clientSecret = await this.tokenService.getClientSecret(); + await this.stateService.setVaultTimeout(timeout); + const currentAction = await this.stateService.getVaultTimeoutAction(); if ( (timeout != null || timeout === 0) &&