Kicks the user out when their session expires.

This commit is contained in:
BC
2019-03-01 07:58:30 -08:00
parent 1fa6154f39
commit c726613ecc
5 changed files with 31 additions and 15 deletions

View File

@@ -164,9 +164,10 @@
(re-frame/reg-event-fx
::logout
(fn [{:keys [db]} [_]]
(fn [{:keys [db]} [_ logout-reason]]
{:db (assoc db :user nil :menu {:client {:active? false}
:account {:active? false}})
:account {:active? false}}
:logout-reason logout-reason)
:redirect (bidi/path-for routes/routes :login)
:set-local-storage ["jwt" nil]}))