Add login check to session deletion endpoint to prevent error #2119
Closes #2119 (closed)
Summary
Adds a check that a user is logged in before attempting session deletion via the auth endpoints DELETE method.
Testing
- Watch the logs - we should not see the error in the attached card:
kubectl get pods | grep fix-session-deletion-2119
kubectl logs ${engine pod name} -f
- While logged out https://fix-session-deletion-2119.minds.io/logout
- Check XHRs - a 401 should be thrown when the endpoint is called and you are not logged in
- Test login and logout still work.
Regression Scope
Minor change, minor scope of regression - at worst it could throw some unforeseen error in the DELETE function affecting logouts, but this is highly unlikely.
Edited by Ben