401 error when invalid grant error is raised

This commit is contained in:
Jeremy Zhang
2019-11-20 19:49:34 -08:00
parent d51410d802
commit c45c98dfb9
2 changed files with 7 additions and 3 deletions

View File

@ -1845,10 +1845,10 @@
});
fet.fail(function(data) {
if (data.status == 403) {
$('#loginmodal').modal('open');
setTimeout(function () {$('#loginmodal').modal('open');}, 2000);
Materialize.toast('Authentication error! You have been disconnected by the server.', 10000);
} else if (data.status == 401) {
$('#loginmodal').modal('open');
setTimeout(function () {$('#loginmodal').modal('open');}, 2000);
Materialize.toast('Session expired! You have been logged out.', 10000);
}
setVisitorMode(true);