Reputation: 11
I'm trying to use biometrics to login to a webView application. I came across LAContext.hash()
which you can run in your evaluatePolicy
method. It generates a 10 digit Int. I tried it multiple times and it always returns the same number.
Any of you might know if it's unique? Can I use it for authentication?
Note: this is not a native app. I'm trying to leverage iOS biometrics to login to my WebView application.
if authenticationContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error){
authenticationContext.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: "scan ... ", reply: { (success, error) in
if success{
let authenticatedHash:Int = LAContext.hash()
print(authenticatedHash)
} else {
if let error = error as NSError? {
}
}
}
Upvotes: 1
Views: 77