0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 23:31:21 -05:00

Merge pull request #5080 from penpot/niwinz-oidc-fix-limits-issues

🐛 Fix oidc auth internal limits issue
This commit is contained in:
Pablo Alba 2024-09-10 16:41:44 +02:00 committed by GitHub
commit 29f1c2bdad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 12 deletions

View file

@ -567,7 +567,6 @@
(tokens/generate (::setup/props cfg)
{:iss :auth
:exp (dt/in-future "15m")
:props (:props info)
:profile-id (:id profile)}))
props (audit/profile->props profile)
context (d/without-nils {:external-session-id (:external-session-id info)})]

View file

@ -30,7 +30,7 @@
(def ^:private schema:verify-token
[:map {:title "verify-token"}
[:token [:string {:max 1000}]]])
[:token [:string {:max 5000}]]])
(sv/defmethod ::verify-token
{::rpc/auth false
@ -82,16 +82,8 @@
(defmethod process-token :auth
[{:keys [conn] :as cfg} _params {:keys [profile-id] :as claims}]
(let [profile (profile/get-profile conn profile-id {::sql/for-update true})
props (merge (:props 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))))
(let [profile (profile/get-profile conn profile-id)]
(assoc claims :profile profile)))
;; --- Team Invitation