Replace Table with responsive Card. Add refresh of token and retry on 401 errors

This commit is contained in:
2019-01-18 14:03:58 +01:00
parent d4f432f422
commit 86486795f6
11 changed files with 230 additions and 248 deletions
+10
View File
@@ -64,6 +64,16 @@ export default class AuthenticationClient {
window.location.href = url;
}
checkSession(resolve, reject) {
this.webAuth.checkSession({state: {}}, (err, result) => {
if (err) {
return reject(err || 'Re-authentication failed');
} else {
return this.storeSession(result, resolve, reject);
}
});
}
storeSession(authResult, resolve, reject) {
this.webAuth.client.userInfo(authResult.accessToken, (err, user) => {
if (err) {