0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Fix session renewal mechanism

This commit is contained in:
Andrey Antukh 2023-11-08 16:25:21 +01:00
parent 76a2e9609f
commit 5d93f17efc

View file

@ -221,12 +221,15 @@
request (cond-> request
(some? session)
(assoc ::profile-id (:profile-id session)
::id (:id session)))]
::id (:id session)))
response (handler request)]
(cond-> (handler request)
(renew-session? session)
(-> (assign-auth-token-cookie session)
(assign-authenticated-cookie session))))))
(if (renew-session? session)
(let [session (update! manager session)]
(-> response
(assign-auth-token-cookie session)
(assign-authenticated-cookie session)))
response))))
(def soft-auth
{:name ::soft-auth