Skip to content

Commit b9ea92a

Browse files
itsmahbubMahbub
andauthored
fix: Invoke backend logout API on logout button click to prevent broken authentication (#6820)
Co-authored-by: Mahbub <mahbub@Mahbubs-MacBook-Pro.local>
1 parent 3caa120 commit b9ea92a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

frontend/common/stores/account-store.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,8 @@ const controller = {
356356
if (!data.token) {
357357
return
358358
}
359-
;(Project.cookieAuthEnabled
360-
? data.post(`${Project.api}auth/logout/`, {})
361-
: Promise.resolve()
359+
360+
data.post(`${Project.api}auth/logout/`, {}
362361
).finally(() => {
363362
API.setCookie('t', '')
364363
data.setToken(null)

0 commit comments

Comments
 (0)