1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00

Mobile: Fixes #10926: Locked out of mobile app due to broken fingerprint scanner

This commit is contained in:
Laurent Cozic 2024-12-13 18:12:54 +01:00
parent c7e3a31ed8
commit 979753d8a7

View File

@ -12,9 +12,19 @@ export default async () => {
} catch (error) { } catch (error) {
const errorName = (error as Errors).name; const errorName = (error as Errors).name;
let errorMessage = error.message; const errorMessage = error.message;
if (errorName === 'FingerprintScannerNotEnrolled' || errorName === 'FingerprintScannerNotAvailable') { if (errorName === 'FingerprintScannerNotEnrolled' || errorName === 'FingerprintScannerNotAvailable') {
errorMessage = _('Biometric unlock is not setup on the device. Please set it up in order to unlock Joplin. If the device is on lockout, consider switching it off and on to reset biometrics scanning.'); // In that case we skip the check because the device biometric unlock has been disabled
// by the user. It should be safe to skip the check since in order to disable it, they
// must have full access to the phone, and should have to enter their pin. Not skipping
// the check would be a problem if biometric unlock was disabled as a result of being
// broken. In this case, the user will never be able to unlock Joplin.
// Ref: https://github.com/laurent22/joplin/issues/10926
logger.warn('Biometric unlock is not setup on the device - skipping check');
return;
// errorMessage = _('Biometric unlock is not setup on the device. Please set it up in order to unlock Joplin. If the device is on lockout, consider switching it off and on to reset biometrics scanning.');
} }
error.message = _('Could not verify your identity: %s', errorMessage); error.message = _('Could not verify your identity: %s', errorMessage);