i want to use Touch ID in my WebView project. If my webview load a certain url i want show the touchid authentication. My question is how can i pause and resume the loading after the authentification is successful ?
I have this following code in the method "shouldStartLoadWithRequest":
if([url isEqualToString:@"...=thisismyurl"]){ LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = @"Please Authentificate";
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:myLocalizedReasonString
reply:^(BOOL success, NSError *error) {
if (success) {
// User authenticated successfully, take appropriate action
????
} else {
// User did not authenticate successfully, look at error and take appropriate action
NSLog(@"NEIN");
}
}];
}}
IMPORTANT: the solution is in my last comment!