1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

Added referenceId to register component

This commit is contained in:
Chad Scharf 2020-06-25 15:18:21 -04:00
parent 87973e9775
commit 03dbe272fc

View File

@ -77,6 +77,9 @@ export class RegisterComponent extends BaseRegisterComponent {
if (qParams.layout != null) {
this.layout = qParams.layout;
}
if (qParams.reference != null) {
this.referenceId = qParams.reference;
}
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
@ -96,6 +99,12 @@ export class RegisterComponent extends BaseRegisterComponent {
if (this.policies != null) {
this.enforcedPolicyOptions = await this.policyService.getMasterPasswordPolicyOptions(this.policies);
}
const referenceId = ('; ' + document.cookie).split('; reference=').pop().split(';').shift();
this.referenceId = this.referenceId || referenceId;
if (this.referenceId === '') {
this.referenceId = null;
}
}
async submit() {