1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

refresh access token after creating org

This commit is contained in:
Kyle Spearrin
2017-04-11 15:00:53 -04:00
parent 8984ec3127
commit 400932c6de
4 changed files with 31 additions and 19 deletions

View File

@@ -70,7 +70,15 @@
$analytics.eventTrack('Created Organization');
authService.addProfileOrganizationOwner(result, shareKey);
$state.go('backend.org.dashboard', { orgId: result.Id }).then(function () {
authService.refreshAccessToken().then(function () {
goToOrg(result.Id);
}, function () {
goToOrg(result.Id);
});
}
function goToOrg(id) {
$state.go('backend.org.dashboard', { orgId: id }).then(function () {
toastr.success('Your new organization is ready to go!', 'Organization Created');
});
}