import { BiometricAuth, AndroidBiometryStrength } from '@aparajita/capacitor-biometric-auth';

export const verifyFingerprint = async () => {
  try {
    await BiometricAuth.authenticate({
      reason: '请进行身份验证',
      cancelTitle: '取消',
      allowDeviceCredential: true,
      iosFallbackTitle: '使用密码',
      androidTitle: '生物识别登录',
      androidSubtitle: '使用生物识别认证登录',
      androidConfirmationRequired: false,
      androidBiometryStrength: AndroidBiometryStrength.weak,
    });
    return true;
  } catch (error) {
    console.error('生物识别异常', error);
    return false;
  }
};


