mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
feat(tokens): Allow Inactive user authenticated API calls
This commit is contained in:
@@ -70,17 +70,17 @@ export class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceA
|
||||
|
||||
// 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 accessToken = await this.tokenService.getAccessToken();
|
||||
const refreshToken = await this.tokenService.getRefreshToken();
|
||||
const clientId = await this.tokenService.getClientId();
|
||||
const clientSecret = await this.tokenService.getClientSecret();
|
||||
const accessToken = await this.tokenService.getAccessToken(userId);
|
||||
const refreshToken = await this.tokenService.getRefreshToken(userId);
|
||||
const clientId = await this.tokenService.getClientId(userId);
|
||||
const clientSecret = await this.tokenService.getClientSecret(userId);
|
||||
|
||||
await this.setVaultTimeout(userId, timeout);
|
||||
|
||||
if (timeout != VaultTimeoutStringType.Never && action === VaultTimeoutAction.LogOut) {
|
||||
// if we have a vault timeout and the action is log out, reset tokens
|
||||
// as the tokens were stored on disk and now should be stored in memory
|
||||
await this.tokenService.clearTokens();
|
||||
await this.tokenService.clearTokens(userId);
|
||||
}
|
||||
|
||||
await this.setVaultTimeoutAction(userId, action);
|
||||
|
||||
Reference in New Issue
Block a user