1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

fix(passkeys): [PM-13932] Fix passkey flow incorrect routing (#12363)

This PR fixes a bug in the LockComponent refresh that affected the setup/save and use passkey flows. The user was wrongly directly to the /vault after unlock instead of to /fido2 (the passkey screen).

Feature Flag: ExtensionRefresh ON
This commit is contained in:
rr-bw
2024-12-12 13:10:54 -08:00
committed by GitHub
parent 2da3043697
commit 8ec75613dc
6 changed files with 85 additions and 9 deletions

View File

@@ -534,8 +534,14 @@ export class LockV2Component implements OnInit, OnDestroy {
if (this.clientType === "browser") {
const previousUrl = this.lockComponentService.getPreviousUrl();
/**
* In a passkey flow, the `previousUrl` will still be `/fido2?<queryParams>` at this point
* because the `/lockV2` route doesn't save the URL in the `BrowserRouterService`. This is
* handled by the `doNotSaveUrl` property on the `lockV2` route in `app-routing.module.ts`.
*/
if (previousUrl) {
await this.router.navigateByUrl(previousUrl);
return;
}
}