From a8667836b3e1daaa69f341af7912208e5b84d05c Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 12 May 2025 22:23:36 +0200 Subject: [PATCH] Ignore invalid token on logout --- dashboard/src/models/ProfileModel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dashboard/src/models/ProfileModel.js b/dashboard/src/models/ProfileModel.js index 705c4b4cb..f0d1b7473 100644 --- a/dashboard/src/models/ProfileModel.js +++ b/dashboard/src/models/ProfileModel.js @@ -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');