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:
parent
76a2e9609f
commit
5d93f17efc
1 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue