0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -05:00

🐛 Show correct error when google auth is disabled on backend.

This commit is contained in:
Andrey Antukh 2021-02-09 17:46:04 +01:00 committed by Andrés Moya
parent fc49674997
commit 36285a65d2
2 changed files with 9 additions and 1 deletions

View file

@ -830,6 +830,12 @@
"es" : "Actualizado: %s"
}
},
"errors.google-auth-not-enabled" : {
"translations" : {
"en" : "Authentication with google disabled on backend",
"es" : "Autenticación con google esta dehabilitada en el servidor"
}
},
"errors.auth.unauthorized" : {
"used-in" : [ "src/app/main/ui/auth/login.cljs:89" ],
"translations" : {

View file

@ -37,7 +37,9 @@
(dom/prevent-default event)
(->> (rp/mutation! :login-with-google {})
(rx/subs (fn [{:keys [redirect-uri] :as rsp}]
(.replace js/location redirect-uri)))))
(.replace js/location redirect-uri))
(fn [{:keys [type] :as error}]
(st/emit! (dm/error (tr "errors.google-auth-not-enabled")))))))
(defn- login-with-gitlab
[event]