1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-13 19:51:37 +01:00

EC-134 Fix api token refresh (#517)

* Update dependencies

* Update jslib
This commit is contained in:
Thomas Rittson 2022-04-01 11:50:48 +10:00 committed by GitHub
parent cfec234ee8
commit 1e9a557494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

2
jslib

@ -1 +1 @@
Subproject commit 15ad2ca3ea92e6a6969f70acb2885dfb89ca7540
Subproject commit e595c0548ed1a481dbd024ec66975e3a453bd471

View File

@ -10,7 +10,6 @@ import { LogLevelType } from "jslib-common/enums/logLevelType";
import { StateFactory } from "jslib-common/factories/stateFactory";
import { Account } from "jslib-common/models/domain/account";
import { GlobalState } from "jslib-common/models/domain/globalState";
import { ApiLogInCredentials } from "jslib-common/models/domain/logInCredentials";
import { AppIdService } from "jslib-common/services/appId.service";
import { AuditService } from "jslib-common/services/audit.service";
import { AuthService } from "jslib-common/services/auth.service";
@ -155,18 +154,20 @@ export class Main {
this.tokenService = new TokenService(this.stateService);
this.messagingService = new NoopMessagingService();
this.environmentService = new EnvironmentService(this.stateService);
const customUserAgent =
"Bitwarden_CLI/" +
this.platformUtilsService.getApplicationVersionSync() +
" (" +
this.platformUtilsService.getDeviceString().toUpperCase() +
")";
this.apiService = new NodeApiService(
this.tokenService,
this.platformUtilsService,
this.environmentService,
this.appIdService,
async (expired: boolean) => await this.logout(),
"Bitwarden_CLI/" +
this.platformUtilsService.getApplicationVersionSync() +
" (" +
this.platformUtilsService.getDeviceString().toUpperCase() +
")",
(clientId, clientSecret) =>
this.authService.logIn(new ApiLogInCredentials(clientId, clientSecret))
customUserAgent
);
this.containerService = new ContainerService(this.cryptoService);