getodk / getodk/central

Log out if session no longer exists

Open
#1,265 2 comments 1 reaction 0 assignees View on GitHub
frontend
Dominant language
JavaScript
Stars
226
Forks
235
Avg merge
2d 22h
Merged PRs (30d)
19

Description

There are a few ways that a user's session could be deleted or no longer exist before the session expires without the user logging out, none of them extremely likely. One example: restoring a backup will cause any sessions created after the backup was created to no longer exist.

Frontend automatically logs out before a session expires, but it doesn't account for the possibility that a session could stop existing before it expires. If that happens, then Frontend will continue sending requests, but it will show the resulting 401 errors. Instead, I think it'd be better for Frontend to log out immediately in that case. (Should it just log out whenever it receives a 401? Or maybe receiving a 401 should cause it to try to check the existence of the session?)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.