mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 20:37:22 +02: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)
|
(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)})]
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
(def ^:private schema:verify-token
|
(def ^:private schema:verify-token
|
||||||
[:map {:title "verify-token"}
|
[:map {:title "verify-token"}
|
||||||
[:token [:string {:max 1000}]]])
|
[:token [:string {:max 5000}]]])
|
||||||
|
|
||||||
(sv/defmethod ::verify-token
|
(sv/defmethod ::verify-token
|
||||||
{::rpc/auth false
|
{::rpc/auth false
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,9 @@
|
||||||
(if (and (= :authorization (:type data))
|
(if (and (= :authorization (:type data))
|
||||||
(= :challenge-required (:code data)))
|
(= :challenge-required (:code data)))
|
||||||
(let [path (rt/get-current-path)
|
(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/of (rt/nav-raw href)))
|
||||||
(rx/throw cause))))
|
(rx/throw cause))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue