mirror of
https://github.com/bitwarden/browser
synced 2025-12-29 06:33:40 +00:00
Observable auth statuses (#8537)
* Observable has token * Allow access to user key state observable * Create observable auth status * Fix DI
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
} from "../../../platform/background/service-factories/state-service.factory";
|
||||
|
||||
import { AccountServiceInitOptions, accountServiceFactory } from "./account-service.factory";
|
||||
import { TokenServiceInitOptions, tokenServiceFactory } from "./token-service.factory";
|
||||
|
||||
type AuthServiceFactoryOptions = FactoryOptions;
|
||||
|
||||
@@ -32,7 +33,8 @@ export type AuthServiceInitOptions = AuthServiceFactoryOptions &
|
||||
MessagingServiceInitOptions &
|
||||
CryptoServiceInitOptions &
|
||||
ApiServiceInitOptions &
|
||||
StateServiceInitOptions;
|
||||
StateServiceInitOptions &
|
||||
TokenServiceInitOptions;
|
||||
|
||||
export function authServiceFactory(
|
||||
cache: { authService?: AbstractAuthService } & CachedServices,
|
||||
@@ -49,6 +51,7 @@ export function authServiceFactory(
|
||||
await cryptoServiceFactory(cache, opts),
|
||||
await apiServiceFactory(cache, opts),
|
||||
await stateServiceFactory(cache, opts),
|
||||
await tokenServiceFactory(cache, opts),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -579,6 +579,7 @@ export default class MainBackground {
|
||||
this.cryptoService,
|
||||
this.apiService,
|
||||
this.stateService,
|
||||
this.tokenService,
|
||||
);
|
||||
|
||||
this.billingAccountProfileStateService = new DefaultBillingAccountProfileStateService(
|
||||
|
||||
Reference in New Issue
Block a user