mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -05:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
7f9c4df284
3 changed files with 6 additions and 13 deletions
|
@ -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)})]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -148,7 +148,9 @@
|
|||
(if (and (= :authorization (:type data))
|
||||
(= :challenge-required (:code data)))
|
||||
(let [path (rt/get-current-path)
|
||||
href (str "/challenge.html?redirect=" path)]
|
||||
href (-> path
|
||||
(str "/challenge.html?redirect=")
|
||||
(js/encodeURIComponent))]
|
||||
(rx/of (rt/nav-raw href)))
|
||||
(rx/throw cause))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue