1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 04:33:38 +00:00

feat(change-password-component): Change Password Update [18720] - Very close to complete.

This commit is contained in:
Patrick Pimentel
2025-05-21 14:55:31 -04:00
parent 27884d9ffe
commit f45e2d7d8a
12 changed files with 121 additions and 25 deletions

View File

@@ -98,7 +98,7 @@ export class WebLoginComponentService
const enforcedPasswordPolicyOptions = await firstValueFrom(
this.accountService.activeAccount$.pipe(
getUserId,
switchMap((userId) => this.policyService.masterPasswordPolicyOptions$(userId)),
switchMap((userId) => this.policyService.masterPasswordPolicyOptions$(userId, policies)),
),
);

View File

@@ -3,7 +3,6 @@
</div>
<div class="tw-max-w-lg tw-mb-12">
<bit-callout type="warning">{{ "loggedOutWarning" | i18n }}</bit-callout>
<auth-change-password [inputPasswordFlow]="inputPasswordFlow"></auth-change-password>
</div>

View File

@@ -10,6 +10,7 @@ import {
unauthGuardFn,
activeAuthGuard,
} from "@bitwarden/angular/auth/guards";
import { canAccessFeature } from "@bitwarden/angular/platform/guard/feature-flag.guard";
import {
AnonLayoutWrapperComponent,
AnonLayoutWrapperData,
@@ -38,7 +39,9 @@ import {
TwoFactorAuthGuard,
NewDeviceVerificationComponent,
DeviceVerificationIcon,
ChangePasswordComponent,
} from "@bitwarden/auth/angular";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { LockComponent } from "@bitwarden/key-management-ui";
import { VaultIcons } from "@bitwarden/vault";
@@ -139,16 +142,54 @@ const routes: Routes = [
canActivate: [unauthGuardFn()],
data: { titleId: "deleteOrganization" },
},
{
path: "",
component: AnonLayoutWrapperComponent,
children: [
{
path: "change-password",
children: [
{
path: "",
component: ChangePasswordComponent,
},
],
data: {
pageIcon: LockIcon,
pageTitle: { key: "updateMasterPassword" },
hideFooter: true,
maxWidth: "lg",
} satisfies AnonLayoutWrapperData,
},
],
data: { titleId: "updatePassword" } satisfies RouteDataProperties,
},
{
path: "update-temp-password",
component: UpdateTempPasswordComponent,
canActivate: [authGuard],
canActivate: [
canAccessFeature(
FeatureFlag.PM16117_ChangeExistingPasswordRefactor,
true,
"/change-password",
false,
),
authGuard,
],
data: { titleId: "updateTempPassword" } satisfies RouteDataProperties,
},
{
path: "update-password",
component: UpdatePasswordComponent,
canActivate: [authGuard],
canActivate: [
canAccessFeature(
FeatureFlag.PM16117_ChangeExistingPasswordRefactor,
true,
"/change-password",
false,
),
authGuard,
],
data: { titleId: "updatePassword" } satisfies RouteDataProperties,
},
{

View File

@@ -1788,6 +1788,9 @@
"loggedOutWarning": {
"message": "Proceeding will log you out of your current session, requiring you to log back in. Active sessions on other devices may continue to remain active for up to one hour."
},
"changePasswordWarning": {
"message": "After changing your password, you will need to log in with your new password. Active sessions on other devices will be logged out within one hour."
},
"emailChanged": {
"message": "Email saved"
},