mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 09:21:39 +02:00
🐛 Fix error handling issue on login with oidc
happens when no oidc backend is configured on backend
This commit is contained in:
parent
3219c150d4
commit
d2937a76d9
1 changed files with 8 additions and 7 deletions
|
@ -53,14 +53,15 @@
|
||||||
(.replace js/location redirect-uri)
|
(.replace js/location redirect-uri)
|
||||||
(log/error :hint "unexpected response from OIDC method"
|
(log/error :hint "unexpected response from OIDC method"
|
||||||
:resp (pr-str rsp))))
|
:resp (pr-str rsp))))
|
||||||
(fn [{:keys [type code] :as error}]
|
(fn [cause]
|
||||||
(cond
|
(let [{:keys [type code] :as error} (ex-data cause)]
|
||||||
(and (= type :restriction)
|
(cond
|
||||||
(= code :provider-not-configured))
|
(and (= type :restriction)
|
||||||
(st/emit! (ntf/error (tr "errors.auth-provider-not-configured")))
|
(= code :provider-not-configured))
|
||||||
|
(st/emit! (ntf/error (tr "errors.auth-provider-not-configured")))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(st/emit! (ntf/error (tr "errors.generic"))))))))
|
(st/emit! (ntf/error (tr "errors.generic")))))))))
|
||||||
|
|
||||||
(def ^:private schema:login-form
|
(def ^:private schema:login-form
|
||||||
[:map {:title "LoginForm"}
|
[:map {:title "LoginForm"}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue