mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05: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)
|
||||
(log/error :hint "unexpected response from OIDC method"
|
||||
:resp (pr-str rsp))))
|
||||
(fn [{:keys [type code] :as error}]
|
||||
(cond
|
||||
(and (= type :restriction)
|
||||
(= code :provider-not-configured))
|
||||
(st/emit! (ntf/error (tr "errors.auth-provider-not-configured")))
|
||||
(fn [cause]
|
||||
(let [{:keys [type code] :as error} (ex-data cause)]
|
||||
(cond
|
||||
(and (= type :restriction)
|
||||
(= code :provider-not-configured))
|
||||
(st/emit! (ntf/error (tr "errors.auth-provider-not-configured")))
|
||||
|
||||
:else
|
||||
(st/emit! (ntf/error (tr "errors.generic"))))))))
|
||||
:else
|
||||
(st/emit! (ntf/error (tr "errors.generic")))))))))
|
||||
|
||||
(def ^:private schema:login-form
|
||||
[:map {:title "LoginForm"}
|
||||
|
|
Loading…
Reference in a new issue