1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

[AC-244] Refreshing identity token after accepting org invite to get updated email verified status (#6094)

This commit is contained in:
Rui Tomé 2023-09-07 14:36:45 +01:00 committed by GitHub
parent 5f78aeaef2
commit 2d73f754bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import { Component } from "@angular/core";
import { ActivatedRoute, Params, Router } from "@angular/router";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
import {
OrganizationUserAcceptInitRequest,
@ -43,7 +44,8 @@ export class AcceptOrganizationComponent extends BaseAcceptComponent {
private logService: LogService,
private organizationApiService: OrganizationApiServiceAbstraction,
private organizationUserService: OrganizationUserService,
private messagingService: MessagingService
private messagingService: MessagingService,
private apiService: ApiService
) {
super(router, platformUtilsService, i18nService, route, stateService);
}
@ -67,6 +69,7 @@ export class AcceptOrganizationComponent extends BaseAcceptComponent {
}
await this.actionPromise;
await this.apiService.refreshIdentityToken();
await this.stateService.setOrganizationInvitation(null);
this.platformUtilService.showToast(
"success",