aboutsummaryrefslogtreecommitdiff
path: root/views/authenticate.js
diff options
context:
space:
mode:
Diffstat (limited to 'views/authenticate.js')
-rw-r--r--views/authenticate.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/views/authenticate.js b/views/authenticate.js
index 398794a..5b64ecd 100644
--- a/views/authenticate.js
+++ b/views/authenticate.js
@@ -28,7 +28,12 @@ function requestAuthentication() {
request.onreadystatechange = function() {
if (request.readyState < 4) return;
- authentication_response = (request.status == 200) ? request.responseText : "";
+ if (request.status == 200) {
+ authentication_response = request.responseText;
+ }
+ else if (request.status == 410) {
+ cookieStorage.removeItem('token');
+ }
}
request.open("POST", "/authenticate", true);
request.send(null);