1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-02 18:17:46 +01:00

pass token and org user id to registration

This commit is contained in:
Kyle Spearrin 2018-05-24 16:51:47 -04:00
parent b393064f26
commit 7cdce165fb

View File

@ -29,6 +29,13 @@ angular
};
$scope.readOnlyEmail = stateParams.email !== null;
var registerOrgUserId = null;
var registerToken = null;
if(stateParams.returnState && stateParams.returnState.params &&
stateParams.returnState.name === 'frontend.organizationAccept') {
registerOrgUserId = stateParams.returnState.params.organizationUserId || null;
registerToken = stateParams.returnState.params.token || null;
}
$timeout(function () {
if ($scope.model.email) {
@ -73,7 +80,9 @@ angular
keys: {
publicKey: result.publicKey,
encryptedPrivateKey: result.privateKeyEnc
}
},
token: registerToken,
organizationUserId: registerOrgUserId
};
return apiService.accounts.register(request).$promise;