mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 11:35:03 -04:00
Detect when the user access token is no more valid and log the user out in this case
This commit is contained in:
parent
613e468b89
commit
7143f358f1
2 changed files with 20 additions and 4 deletions
|
@ -55,8 +55,14 @@ angular.module('MatrixWebClientController', ['matrixService'])
|
|||
|
||||
// And go to the login page
|
||||
$location.path("login");
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// Listen to the event indicating that the access token is no more valid.
|
||||
// In this case, the user needs to log in again.
|
||||
$scope.$on("M_UNKNOWN_TOKEN", function() {
|
||||
console.log("Invalid access token -> log user out");
|
||||
$scope.logout();
|
||||
});
|
||||
}]);
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue