mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-30 13:03:53 +01:00
Add referenceId to register component
This commit is contained in:
parent
7f6d7424e7
commit
c3389afd4f
@ -22,6 +22,7 @@ export class RegisterComponent {
|
|||||||
showPassword: boolean = false;
|
showPassword: boolean = false;
|
||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
masterPasswordScore: number;
|
masterPasswordScore: number;
|
||||||
|
referenceId: string;
|
||||||
|
|
||||||
protected successRoute = 'login';
|
protected successRoute = 'login';
|
||||||
private masterPasswordStrengthTimeout: any;
|
private masterPasswordStrengthTimeout: any;
|
||||||
@ -110,7 +111,7 @@ export class RegisterComponent {
|
|||||||
const hashedPassword = await this.cryptoService.hashPassword(this.masterPassword, key);
|
const hashedPassword = await this.cryptoService.hashPassword(this.masterPassword, key);
|
||||||
const keys = await this.cryptoService.makeKeyPair(encKey[0]);
|
const keys = await this.cryptoService.makeKeyPair(encKey[0]);
|
||||||
const request = new RegisterRequest(this.email, this.name, hashedPassword,
|
const request = new RegisterRequest(this.email, this.name, hashedPassword,
|
||||||
this.hint, encKey[1].encryptedString, kdf, kdfIterations);
|
this.hint, encKey[1].encryptedString, kdf, kdfIterations, this.referenceId);
|
||||||
request.keys = new KeysRequest(keys[0], keys[1].encryptedString);
|
request.keys = new KeysRequest(keys[0], keys[1].encryptedString);
|
||||||
const orgInvite = await this.stateService.get<any>('orgInvitation');
|
const orgInvite = await this.stateService.get<any>('orgInvitation');
|
||||||
if (orgInvite != null && orgInvite.token != null && orgInvite.organizationUserId != null) {
|
if (orgInvite != null && orgInvite.token != null && orgInvite.organizationUserId != null) {
|
||||||
|
@ -13,9 +13,10 @@ export class RegisterRequest {
|
|||||||
organizationUserId: string;
|
organizationUserId: string;
|
||||||
kdf: KdfType;
|
kdf: KdfType;
|
||||||
kdfIterations: number;
|
kdfIterations: number;
|
||||||
|
referenceId: string;
|
||||||
|
|
||||||
constructor(email: string, name: string, masterPasswordHash: string, masterPasswordHint: string, key: string,
|
constructor(email: string, name: string, masterPasswordHash: string, masterPasswordHint: string, key: string,
|
||||||
kdf: KdfType, kdfIterations: number) {
|
kdf: KdfType, kdfIterations: number, referenceId: string) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.email = email;
|
this.email = email;
|
||||||
this.masterPasswordHash = masterPasswordHash;
|
this.masterPasswordHash = masterPasswordHash;
|
||||||
@ -23,5 +24,6 @@ export class RegisterRequest {
|
|||||||
this.key = key;
|
this.key = key;
|
||||||
this.kdf = kdf;
|
this.kdf = kdf;
|
||||||
this.kdfIterations = kdfIterations;
|
this.kdfIterations = kdfIterations;
|
||||||
|
this.referenceId = referenceId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user