chore: fix type and deprecation warning
MODIFY
src/app/components/account/account.component.ts
src/app/components/account/account.component.ts
@@ -46,7 +46,7 @@ export class AccountComponent implements OnInit {
this.accountUrl = this.keycloakHelper.getKeycloakAccountUrl();
this.userProfile$ = from(this.keycloakHelper.getUserProfile());
this.apimanAccount$ = this.backendService.getCurrentUser();
- this.keycloakToken = this.keycloakHelper.decodeCurrentKeyloakToken();
+ this.keycloakToken = this.keycloakHelper.decodeCurrentKeycloakToken();
}
private setUpHero() {

MODIFY
src/app/services/keycloak-helper/keycloak-helper.service.ts
src/app/services/keycloak-helper/keycloak-helper.service.ts
@@ -128,10 +128,10 @@ export class KeycloakHelperService {
return this.username;
}
- public decodeCurrentKeyloakToken(): KeycloakTokenParsed {
+ public decodeCurrentKeycloakToken(): KeycloakTokenParsed {
try {
return <KeycloakTokenParsed>(
- JSON.parse(atob(this.getToken().split('.')[1]))
+ JSON.parse(window.atob(this.getToken().split('.')[1]))
);
} catch (error) {
console.error('Error while decoding keycloak token', error);

chore: fix type and deprecation warning