update open-login-callback after fx/def macro fix
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
34300cc0c0
commit
e93906c0d9
|
@ -558,4 +558,6 @@ var TopLevel = {
|
|||
"FIRSTWEEKCUTOFFDAY": function () {},
|
||||
"decimalPlaces": function () {},
|
||||
"_android": function () {},
|
||||
"isSupported" : function () {},
|
||||
"authenticate" : function () {},
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
(def status-keycard (js-require/js-require "react-native-status-keycard"))
|
||||
(def realm (js/require "realm"))
|
||||
(def webview-bridge (js-require/js-require "react-native-webview-bridge"))
|
||||
(defn touchid [] (.-default (js/require "react-native-touch-id")))
|
||||
(def touchid-class (js-require/js-require "react-native-touch-id"))
|
||||
(defn touchid [] (.-default (touchid-class)))
|
||||
(def webview (js-require/js-require "react-native-webview"))
|
||||
(def securerandom (js-require/js-require "react-native-securerandom"))
|
||||
(defn secure-random [] (.-generateSecureRandom (securerandom)))
|
||||
|
|
|
@ -317,18 +317,17 @@
|
|||
|
||||
(fx/defn open-login-callback
|
||||
{:events [:accounts.login.callback/biometric-auth-done]}
|
||||
[{:keys [db] :as cofx} password biometric-auth-result]
|
||||
(let [{:keys [bioauth-success bioauth-notrequired bioauth-message]} biometric-auth-result]
|
||||
(if (and password
|
||||
(or bioauth-success bioauth-notrequired))
|
||||
(fx/merge cofx
|
||||
{:db (assoc-in db [:accounts/login :password] password)}
|
||||
(navigation/navigate-to-cofx :progress nil)
|
||||
(user-login false))
|
||||
(fx/merge cofx
|
||||
(when bioauth-message
|
||||
{:utils/show-popup {:title (i18n/label :t/biometric-auth-login-error-title) :content bioauth-message}})
|
||||
(navigation/navigate-to-cofx :login nil)))))
|
||||
[{:keys [db] :as cofx} password {:keys [bioauth-success bioauth-notrequired bioauth-message]}]
|
||||
(if (and password
|
||||
(or bioauth-success bioauth-notrequired))
|
||||
(fx/merge cofx
|
||||
{:db (assoc-in db [:accounts/login :password] password)}
|
||||
(navigation/navigate-to-cofx :progress nil)
|
||||
(user-login false))
|
||||
(fx/merge cofx
|
||||
(when bioauth-message
|
||||
{:utils/show-popup {:title (i18n/label :t/biometric-auth-login-error-title) :content bioauth-message}})
|
||||
(navigation/navigate-to-cofx :login nil))))
|
||||
|
||||
(fx/defn do-biometric-auth
|
||||
[{:keys [db] :as cofx} password]
|
||||
|
|
Loading…
Reference in New Issue