Biometrics start and end notifications added
This commit is contained in:
parent
03123ae15b
commit
5494db6ae9
|
|
@ -101,9 +101,11 @@ open class BasePassCodeViewModel: BaseViewModel {
|
|||
}
|
||||
|
||||
public func authenticateUsingBiometrics(with description: String, fallback: String?, cancel: String?) {
|
||||
biometricsAuthBegins()
|
||||
biometricsService.authenticateWithBiometrics(with: description,
|
||||
fallback: fallback,
|
||||
cancel: cancel) { [weak self] success, error in
|
||||
self?.biometricsAuthEnds()
|
||||
if success {
|
||||
self?.authSucceed(.touchId)
|
||||
} else {
|
||||
|
|
@ -142,6 +144,12 @@ open class BasePassCodeViewModel: BaseViewModel {
|
|||
assertionFailure("You should override this method: activateBiometricsForUser()")
|
||||
}
|
||||
|
||||
/// Notify before system alert with biometrics
|
||||
open func biometricsAuthBegins() {}
|
||||
|
||||
/// Notify after system alert with biometrics
|
||||
open func biometricsAuthEnds() {}
|
||||
|
||||
}
|
||||
|
||||
private extension BasePassCodeViewModel {
|
||||
|
|
|
|||
Loading…
Reference in New Issue