added redirectUri to go back where the user was

This commit is contained in:
Erik Jan de Wit 2019-12-06 17:26:50 +01:00 committed by Stan Silvert
parent af0f43b769
commit 9cfb22f176

View file

@ -97,7 +97,7 @@ export class AccountServiceClient {
private handleError(error: AxiosError): void {
if (error != null && error.response != null && error.response.status === 401) {
// session timed out?
this.kcSvc.login();
this.kcSvc.login({ redirectUri: window.location.href });
}
console.log(error);
ContentAlert.danger(error.name + ': ' + error.message);
@ -114,7 +114,7 @@ export class AccountServiceClient {
headers: {...config.headers, Authorization: 'Bearer ' + token}
});
}).catch(() => {
this.kcSvc.login();
this.kcSvc.login({ redirectUri: window.location.href });
});
});
}