Replace Table with responsive Card. Add refresh of token and retry on 401 errors
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user