mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-06 18:57:56 +01:00
pass token and org user id to registration
This commit is contained in:
parent
b393064f26
commit
7cdce165fb
@ -29,6 +29,13 @@ angular
|
|||||||
};
|
};
|
||||||
$scope.readOnlyEmail = stateParams.email !== null;
|
$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 () {
|
$timeout(function () {
|
||||||
if ($scope.model.email) {
|
if ($scope.model.email) {
|
||||||
@ -73,7 +80,9 @@ angular
|
|||||||
keys: {
|
keys: {
|
||||||
publicKey: result.publicKey,
|
publicKey: result.publicKey,
|
||||||
encryptedPrivateKey: result.privateKeyEnc
|
encryptedPrivateKey: result.privateKeyEnc
|
||||||
}
|
},
|
||||||
|
token: registerToken,
|
||||||
|
organizationUserId: registerOrgUserId
|
||||||
};
|
};
|
||||||
|
|
||||||
return apiService.accounts.register(request).$promise;
|
return apiService.accounts.register(request).$promise;
|
||||||
|
Loading…
Reference in New Issue
Block a user