1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-16 00:04:34 +00:00

Bug/refresh token fixes (#199)

* Remove NodeApi class extension and use correct apiService in services module

* lint fixes
This commit is contained in:
Robyn MacCallum
2021-12-30 15:31:19 -05:00
committed by GitHub
parent 857d725a77
commit 771a182235
3 changed files with 10 additions and 35 deletions

View File

@@ -16,6 +16,7 @@ import { JslibServicesModule } from "jslib-angular/services/jslib-services.modul
import { ContainerService } from "jslib-common/services/container.service";
import { NodeApiService } from "jslib-node/services/nodeApi.service";
import { NodeCryptoFunctionService } from "jslib-node/services/nodeCryptoFunction.service";
import { ApiService as ApiServiceAbstraction } from "jslib-common/abstractions/api.service";
@@ -135,12 +136,17 @@ export function initFactory(
messagingService: MessagingServiceAbstraction,
injector: Injector
) =>
new ApiService(
new NodeApiService(
tokenService,
platformUtilsService,
environmentService,
refreshTokenCallback(injector),
async (expired: boolean) => messagingService.send("logout", { expired: expired })
async (expired: boolean) => messagingService.send("logout", { expired: expired }),
"Bitwarden_DC/" +
platformUtilsService.getApplicationVersion() +
" (" +
platformUtilsService.getDeviceString().toUpperCase() +
")",
refreshTokenCallback(injector)
),
deps: [
TokenServiceAbstraction,