public handleExpiredRefreshToken(): void {
this.csAgentAuthService
.isCustomerSupportAgentLoggedIn()
.pipe(take(1))
.subscribe((csAgentLoggedIn) => {
if (csAgentLoggedIn) {
this.csAgentAuthService.logoutCustomerSupportAgent();
this.globalMessageService.add(
{
key: 'asm.csagentTokenExpired',
},
GlobalMessageType.MSG_TYPE_ERROR
);
} else {
super.handleExpiredRefreshToken();
}
});
}
如果token过期(expire),调用handleExpiredRefreshToken:
然后调用this.routingService.go({ cxRoute: ‘login’);
更多Jerry的原创文章,尽在:“汪子熙”: