mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
[PM-23596] Redirect to /setup-extension (#15641)
* remove current redirection from auth code * update timeouts of the web browser interaction * add guard for setup-extension page * decrease timeout to 25ms * avoid redirection for mobile users + add tests * add tests * condense variables * catch error from profile fetch --------- Co-authored-by: Shane Melton <smelton@bitwarden.com>
This commit is contained in:
@@ -28,10 +28,6 @@ export class DefaultRegistrationFinishService implements RegistrationFinishServi
|
||||
return null;
|
||||
}
|
||||
|
||||
determineLoginSuccessRoute(): Promise<string> {
|
||||
return Promise.resolve("/vault");
|
||||
}
|
||||
|
||||
async finishRegistration(
|
||||
email: string,
|
||||
passwordInputResult: PasswordInputResult,
|
||||
|
||||
@@ -204,8 +204,7 @@ export class RegistrationFinishComponent implements OnInit, OnDestroy {
|
||||
|
||||
await this.loginSuccessHandlerService.run(authenticationResult.userId);
|
||||
|
||||
const successRoute = await this.registrationFinishService.determineLoginSuccessRoute();
|
||||
await this.router.navigate([successRoute]);
|
||||
await this.router.navigate(["/vault"]);
|
||||
} catch (e) {
|
||||
// If login errors, redirect to login page per product. Don't show error
|
||||
this.logService.error("Error logging in after registration: ", e.message);
|
||||
|
||||
@@ -16,11 +16,6 @@ export abstract class RegistrationFinishService {
|
||||
*/
|
||||
abstract getMasterPasswordPolicyOptsFromOrgInvite(): Promise<MasterPasswordPolicyOptions | null>;
|
||||
|
||||
/**
|
||||
* Returns the route the user is redirected to after a successful login.
|
||||
*/
|
||||
abstract determineLoginSuccessRoute(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Finishes the registration process by creating a new user account.
|
||||
*
|
||||
|
||||
@@ -202,6 +202,13 @@ export const SECURITY_TASKS_DISK = new StateDefinition("securityTasks", "disk");
|
||||
export const AT_RISK_PASSWORDS_PAGE_DISK = new StateDefinition("atRiskPasswordsPage", "disk");
|
||||
export const NOTIFICATION_DISK = new StateDefinition("notifications", "disk");
|
||||
export const NUDGES_DISK = new StateDefinition("nudges", "disk", { web: "disk-local" });
|
||||
export const SETUP_EXTENSION_DISMISSED_DISK = new StateDefinition(
|
||||
"setupExtensionDismissed",
|
||||
"disk",
|
||||
{
|
||||
web: "disk-local",
|
||||
},
|
||||
);
|
||||
export const VAULT_BROWSER_INTRO_CAROUSEL = new StateDefinition(
|
||||
"vaultBrowserIntroCarousel",
|
||||
"disk",
|
||||
|
||||
Reference in New Issue
Block a user