Ignore invalid token on logout

This commit is contained in:
Johannes Zellner
2025-05-12 22:23:36 +02:00
parent 31d0d6c7c9
commit a8667836b3
+3 -2
View File
@@ -30,8 +30,9 @@ function create() {
return {
name: 'ProfileModel',
async logout() {
// destroy oidc session in the spirit of true SSO
await fetcher.del(`${API_ORIGIN}/api/v1/oidc/sessions`, null, { access_token: accessToken });
// attempt to destroy oidc session in the spirit of true SSO
// eslint-disable-next-line no-empty, no-unused-vars
try { await fetcher.del(`${API_ORIGIN}/api/v1/oidc/sessions`, null, { access_token: accessToken }); } catch (e) {}
localStorage.removeItem('token');