mirror of
https://github.com/penpot/penpot.git
synced 2025-06-08 13:01:38 +02:00
🐛 Don't send user props on auth token after oidc login
This commit is contained in:
parent
860e32d965
commit
452aabdec6
2 changed files with 2 additions and 11 deletions
|
@ -567,7 +567,6 @@
|
||||||
(tokens/generate (::setup/props cfg)
|
(tokens/generate (::setup/props cfg)
|
||||||
{:iss :auth
|
{:iss :auth
|
||||||
:exp (dt/in-future "15m")
|
:exp (dt/in-future "15m")
|
||||||
:props (:props info)
|
|
||||||
:profile-id (:id profile)}))
|
:profile-id (:id profile)}))
|
||||||
props (audit/profile->props profile)
|
props (audit/profile->props profile)
|
||||||
context (d/without-nils {:external-session-id (:external-session-id info)})]
|
context (d/without-nils {:external-session-id (:external-session-id info)})]
|
||||||
|
|
|
@ -82,16 +82,8 @@
|
||||||
|
|
||||||
(defmethod process-token :auth
|
(defmethod process-token :auth
|
||||||
[{:keys [conn] :as cfg} _params {:keys [profile-id] :as claims}]
|
[{:keys [conn] :as cfg} _params {:keys [profile-id] :as claims}]
|
||||||
(let [profile (profile/get-profile conn profile-id {::sql/for-update true})
|
(let [profile (profile/get-profile conn profile-id)]
|
||||||
props (merge (:props profile)
|
(assoc claims :profile profile)))
|
||||||
(:props claims))]
|
|
||||||
(when (not= props (:props profile))
|
|
||||||
(db/update! conn :profile
|
|
||||||
{:props (db/tjson props)}
|
|
||||||
{:id profile-id}))
|
|
||||||
|
|
||||||
(let [profile (assoc profile :props props)]
|
|
||||||
(assoc claims :profile profile))))
|
|
||||||
|
|
||||||
;; --- Team Invitation
|
;; --- Team Invitation
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue