mirror of
https://github.com/bitwarden/browser
synced 2026-01-08 19:43:45 +00:00
Auth/PM-11945 - Registration with Email Verification - Fix Org Sponsored Free Family Plan not working (#11012)
* PM-11945 - AcceptOrg - fix inaccurate comment. * PM-11945 - Refactor new registration process to pass along orgSponsoredFreeFamilyPlanToken * PM-11945 - RegistrationFinishComponent - wire up passing of orgSponsoredFreeFamilyPlanToken to submit method * PM-11945 - Add todo
This commit is contained in:
@@ -66,17 +66,18 @@ export class WebRegistrationFinishService
|
||||
// Note: the org invite token and email verification are mutually exclusive. Only one will be present.
|
||||
override async buildRegisterRequest(
|
||||
email: string,
|
||||
emailVerificationToken: string,
|
||||
passwordInputResult: PasswordInputResult,
|
||||
encryptedUserKey: EncryptedString,
|
||||
userAsymmetricKeys: [string, EncString],
|
||||
emailVerificationToken?: string,
|
||||
orgSponsoredFreeFamilyPlanToken?: string,
|
||||
): Promise<RegisterFinishRequest> {
|
||||
const registerRequest = await super.buildRegisterRequest(
|
||||
email,
|
||||
emailVerificationToken,
|
||||
passwordInputResult,
|
||||
encryptedUserKey,
|
||||
userAsymmetricKeys,
|
||||
emailVerificationToken,
|
||||
);
|
||||
|
||||
// web specific logic
|
||||
@@ -89,6 +90,10 @@ export class WebRegistrationFinishService
|
||||
}
|
||||
// Invite is accepted after login (on deep link redirect).
|
||||
|
||||
if (orgSponsoredFreeFamilyPlanToken) {
|
||||
registerRequest.orgSponsoredFreeFamilyPlanToken = orgSponsoredFreeFamilyPlanToken;
|
||||
}
|
||||
|
||||
return registerRequest;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,8 +99,7 @@ export class AcceptOrganizationComponent extends BaseAcceptComponent {
|
||||
email: invite.email,
|
||||
};
|
||||
} else if (registerRoute === "/signup") {
|
||||
// We have to override the base component route b/c it is correct for other components
|
||||
// that extend the base accept comp. We don't need users to complete email verification
|
||||
// We have to override the base component route as we don't need users to complete email verification
|
||||
// if they are coming directly from an emailed org invite.
|
||||
registerRoute = "/finish-signup";
|
||||
queryParams = {
|
||||
|
||||
Reference in New Issue
Block a user