Invalidate all other sessions on password change.

This commit is contained in:
Andrey Antukh 2021-11-15 16:45:50 +01:00 committed by Andrés Moya
parent abca69f408
commit bf51e3db60
5 changed files with 18 additions and 9 deletions

View file

@ -19,11 +19,10 @@
(defn- on-error
[form error]
(case (:code error)
:app.services.mutations.profile/old-password-not-match
:old-password-not-match
(swap! form assoc-in [:errors :password-old]
{:message (tr "errors.wrong-old-password")})
:else
(let [msg (tr "generic.error")]
(st/emit! (dm/error msg)))))