diff options
| author | Syndamia <kamen@syndamia.com> | 2025-02-08 17:12:22 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-02-08 17:12:22 +0200 |
| commit | c1a7d625fc0c86727a4e4a9dc6cfa1e19699d170 (patch) | |
| tree | 02001659fef0e2b578a6c8644d579344accd5748 /views/authenticate.js | |
| parent | 6a3ac35d35e92537438a47eb0441a077a5d791cf (diff) | |
| download | nowayforward_human-c1a7d625fc0c86727a4e4a9dc6cfa1e19699d170.tar nowayforward_human-c1a7d625fc0c86727a4e4a9dc6cfa1e19699d170.tar.gz nowayforward_human-c1a7d625fc0c86727a4e4a9dc6cfa1e19699d170.zip | |
feat(authenticate): Delete requests for expired cookies
Diffstat (limited to 'views/authenticate.js')
| -rw-r--r-- | views/authenticate.js | 7 |
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); |
