mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 18:53:29 +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:
committed by
GitHub
parent
ecb0d1e2f3
commit
eb99eba284
@@ -2,9 +2,7 @@
|
||||
// @ts-strict-ignore
|
||||
import { Component } from "@angular/core";
|
||||
import { ActivatedRoute, Params, Router } from "@angular/router";
|
||||
import { firstValueFrom } from "rxjs";
|
||||
|
||||
import { RegisterRouteService } from "@bitwarden/auth/common";
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { ProviderUserAcceptRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-user-accept.request";
|
||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||
@@ -33,9 +31,8 @@ export class AcceptProviderComponent extends BaseAcceptComponent {
|
||||
authService: AuthService,
|
||||
private apiService: ApiService,
|
||||
platformUtilService: PlatformUtilsService,
|
||||
registerRouteService: RegisterRouteService,
|
||||
) {
|
||||
super(router, platformUtilService, i18nService, route, authService, registerRouteService);
|
||||
super(router, platformUtilService, i18nService, route, authService);
|
||||
}
|
||||
|
||||
async authedHandler(qParams: Params) {
|
||||
@@ -47,6 +44,7 @@ export class AcceptProviderComponent extends BaseAcceptComponent {
|
||||
qParams.providerUserId,
|
||||
request,
|
||||
);
|
||||
|
||||
this.platformUtilService.showToast(
|
||||
"success",
|
||||
this.i18nService.t("inviteAccepted"),
|
||||
@@ -64,25 +62,14 @@ export class AcceptProviderComponent extends BaseAcceptComponent {
|
||||
}
|
||||
|
||||
async register() {
|
||||
let queryParams: Params;
|
||||
let registerRoute = await firstValueFrom(this.registerRoute$);
|
||||
if (registerRoute === "/register") {
|
||||
queryParams = {
|
||||
email: this.email,
|
||||
};
|
||||
} else if (registerRoute === "/signup") {
|
||||
// We have to override the base component route as we don't need users to
|
||||
// complete email verification if they are coming directly an emailed invite.
|
||||
registerRoute = "/finish-signup";
|
||||
queryParams = {
|
||||
// We don't need users to complete email verification if they are coming directly from an emailed invite.
|
||||
// Therefore, we skip /signup and navigate directly to /finish-signup.
|
||||
await this.router.navigate(["/finish-signup"], {
|
||||
queryParams: {
|
||||
email: this.email,
|
||||
providerUserId: this.providerUserId,
|
||||
providerInviteToken: this.providerInviteToken,
|
||||
};
|
||||
}
|
||||
|
||||
await this.router.navigate([registerRoute], {
|
||||
queryParams: queryParams,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user