1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

refactor(email-verification-feature-flag): [PM-7882] Email Verificati… (#12718)

* refactor(email-verification-feature-flag): [PM-7882] Email Verification - Removed email feature flag.
This commit is contained in:
Patrick-Pimentel-Bitwarden
2025-01-21 11:16:32 -05:00
committed by GitHub
parent ecb0d1e2f3
commit eb99eba284
27 changed files with 84 additions and 252 deletions

View File

@@ -3,7 +3,6 @@ import { Component, inject } from "@angular/core";
import { RouterModule } from "@angular/router";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { RegisterRouteService } from "@bitwarden/auth/common";
import { DefaultServerSettingsService } from "@bitwarden/common/platform/services/default-server-settings.service";
import { LinkModule } from "@bitwarden/components";
@@ -13,16 +12,12 @@ import { LinkModule } from "@bitwarden/components";
template: `
<div class="tw-text-center" *ngIf="!(isUserRegistrationDisabled$ | async)">
{{ "newToBitwarden" | i18n }}
<a bitLink [routerLink]="registerRoute$ | async">{{ "createAccount" | i18n }}</a>
<a bitLink routerLink="/signup">{{ "createAccount" | i18n }}</a>
</div>
`,
})
export class LoginSecondaryContentComponent {
registerRouteService = inject(RegisterRouteService);
serverSettingsService = inject(DefaultServerSettingsService);
// TODO: remove when email verification flag is removed
protected registerRoute$ = this.registerRouteService.registerRoute$();
protected isUserRegistrationDisabled$ = this.serverSettingsService.isUserRegistrationDisabled$;
}

View File

@@ -480,16 +480,7 @@ export class SsoComponent implements OnInit {
}
private async handleChangePasswordRequired(orgIdentifier: string) {
const emailVerification = await this.configService.getFeatureFlag(
FeatureFlag.EmailVerification,
);
let route = "set-password";
if (emailVerification) {
route = "set-password-jit";
}
await this.router.navigate([route], {
await this.router.navigate(["set-password-jit"], {
queryParams: {
identifier: orgIdentifier,
},

View File

@@ -4,6 +4,5 @@ export * from "./login-strategies/login-strategy.service";
export * from "./user-decryption-options/user-decryption-options.service";
export * from "./auth-request/auth-request.service";
export * from "./auth-request/auth-request-api.service";
export * from "./register-route.service";
export * from "./accounts/lock.service";
export * from "./login-success-handler/default-login-success-handler.service";

View File

@@ -1,21 +0,0 @@
import { Observable, map } from "rxjs";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
// This is a temporary service to determine the correct route to use for registration based on the email verification feature flag.
export class RegisterRouteService {
constructor(private configService: ConfigService) {}
registerRoute$(): Observable<string> {
return this.configService.getFeatureFlag$(FeatureFlag.EmailVerification).pipe(
map((emailVerificationEnabled) => {
if (emailVerificationEnabled) {
return "/signup";
} else {
return "/register";
}
}),
);
}
}