mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
Refactored fido2 popup to use auth guard when routing to component, added BrowserRouterService to track previous page and route using that
This commit is contained in:
@@ -2828,6 +2828,23 @@ 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)) {
|
||||
|
||||
Reference in New Issue
Block a user