mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 09:33:27 +00:00
refactored router service to not store on the disk
This commit is contained in:
@@ -524,17 +524,4 @@ export abstract class StateService<T extends Account = Account> {
|
||||
value: Record<string, Record<string, boolean>>,
|
||||
options?: StorageOptions
|
||||
) => Promise<void>;
|
||||
/**
|
||||
* fetches string value of the URL stored here, usually only called after SSO flows.
|
||||
* @param options Defines the storage options for the URL; Defaults to Local Storage.
|
||||
* @returns route called prior to SSO routing to organizations configured IdP.
|
||||
*/
|
||||
getPreviousUrl: (options?: StorageOptions) => Promise<string>;
|
||||
/**
|
||||
* Store URL in local storage by default, but can be configured. Developed to handle
|
||||
* SSO routing to organizations configured IdP.
|
||||
* @param url URL of route
|
||||
* @param options Defines the storage options for the URL; Defaults to Local Storage.
|
||||
*/
|
||||
setPreviousUrl: (url: string, options?: StorageOptions) => Promise<void>;
|
||||
}
|
||||
|
||||
@@ -37,5 +37,4 @@ export class GlobalState {
|
||||
enableBrowserIntegrationFingerprint?: boolean;
|
||||
enableDuckDuckGoBrowserIntegration?: boolean;
|
||||
region?: string;
|
||||
previousUrl?: string;
|
||||
}
|
||||
|
||||
@@ -2828,23 +2828,6 @@ export class StateService<
|
||||
);
|
||||
}
|
||||
|
||||
async getPreviousUrl(options?: StorageOptions): Promise<string> {
|
||||
return (
|
||||
await this.getGlobals(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
|
||||
)?.previousUrl;
|
||||
}
|
||||
|
||||
async setPreviousUrl(url: string, options?: StorageOptions): Promise<void> {
|
||||
const globals = await this.getGlobals(
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())
|
||||
);
|
||||
globals.previousUrl = url;
|
||||
await this.saveGlobals(
|
||||
globals,
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())
|
||||
);
|
||||
}
|
||||
|
||||
protected async getGlobals(options: StorageOptions): Promise<TGlobalState> {
|
||||
let globals: TGlobalState;
|
||||
if (this.useMemory(options.storageLocation)) {
|
||||
|
||||
@@ -83,8 +83,7 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
|
||||
throw new Fido2AutenticatorError(Fido2AutenticatorErrorCode.Unknown);
|
||||
}
|
||||
|
||||
//TODO: uncomment this when working on the login flow ticket
|
||||
// await userInterfaceSession.ensureUnlockedVault();
|
||||
await userInterfaceSession.ensureUnlockedVault();
|
||||
|
||||
const existingCipherIds = await this.findExcludedCredentials(
|
||||
params.excludeCredentialDescriptorList
|
||||
@@ -238,8 +237,7 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
|
||||
|
||||
let cipherOptions: CipherView[];
|
||||
|
||||
//TODO: uncomment this when working on the login flow ticket
|
||||
// await userInterfaceSession.ensureUnlockedVault();
|
||||
await userInterfaceSession.ensureUnlockedVault();
|
||||
|
||||
// eslint-disable-next-line no-empty
|
||||
if (params.allowCredentialDescriptorList?.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user