fix JWT error (#5376)

This commit is contained in:
Eugenio Romano 2020-01-20 17:24:11 +00:00 committed by Denys Vuika
parent e0bc43d933
commit 91abe87ccc

View File

@ -51,7 +51,7 @@ export class AuthGuard extends AuthGuardBase {
this.ticketChangeRedirect(event, 'BPM');
}
if (event.key.includes(JwtHelperService.USER_ACCESS_TOKEN) &&
if (event.key.endsWith(JwtHelperService.USER_ACCESS_TOKEN) &&
this.jwtHelperService.getValueFromToken(event.newValue, JwtHelperService.USER_PREFERRED_USERNAME) !==
this.jwtHelperService.getValueFromToken(event.oldValue, JwtHelperService.USER_PREFERRED_USERNAME)) {
this.ticketChangeRedirect(event, 'ALL');