verdnatura-chat/patches/expo-local-authentication+9...

267 lines
28 KiB
Diff
Raw Permalink Normal View History

[NEW] Passcode and biometric unlock (#2059) * Update expo libs * Configure expo-local-authentication * ScreenLockedView * Authenticate server change * Auth on app resume * localAuthentication util * Add servers.lastLocalAuthenticatedSession column * Save last session date on background * Use our own version of app state redux * Fix libs * Remove inactive * ScreenLockConfigView * Apply on saved data * Auto lock option label * Starting passcode * Basic passcode flow working * Change passcode * Check if biometry is enrolled * Use fork * Migration * Patch expo-local-authentication * Use async storage * Styling * Timer * Refactor * Lock orientation portrait when not on tablet * share extension * Deep linking * Share extension * Refactoring passcode * use state * Stash * Refactor * Change passcode * Animate dots on error * Matching passcodes * Shake * Remove lib * Delete button * Fade animation on modal * Refactoring * ItemInfo * I18n * I18n * Remove unnecessary prop * Save biometry column * Raise time to lock to 30 seconds * Vibrate on wrong confirmation passcode * Reset attempts and save last authentication on local passcode confirmation * Remove inline style * Save last auth * Fix header blink * Change function name * Fix android modal * Fix vibration permission * PasscodeEnter calls biometry * Passcode on the state * Biometry button on PasscodeEnter * Show whole passcode * Secure passcode * Save passcode with promise to prevent empty passcodes and immediately lock * Patch expo-local-authentication * I18n * Fix biometry being called every time * Blur screen on app inactive * Revert "Blur screen on app inactive" This reverts commit a4ce812934adcf6cf87eb1a92aec9283e2f26753. * Remove immediately because of how Activities work on Android * Pods * New layout * stash * Layout refactored * Fix icons * Force set passcode from server * Lint * Improve permission message * Forced passcode subtitle * Disable based on admin's choice * Require local authentication on login success * Refactor * Update tests * Update react-native-device-info to fix notch * Lint * Fix modal * Fix icons * Fix min auto lock time * Review * keep enabled on mobile * fix forced by admin when enable unlock with passcode * use DEFAULT_AUTO_LOCK when manual enable screenLock * fix check has passcode * request biometry on first password * reset auto time lock when disabled on server Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
2020-05-08 17:04:37 +00:00
diff --git a/node_modules/expo-local-authentication/android/android-expo-local-authentication.iml b/node_modules/expo-local-authentication/android/android-expo-local-authentication.iml
new file mode 100644
index 0000000..8401261
--- /dev/null
+++ b/node_modules/expo-local-authentication/android/android-expo-local-authentication.iml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id=":expo-local-authentication" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../../android" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="android-gradle" name="Android-Gradle">
+ <configuration>
+ <option name="GRADLE_PROJECT_PATH" value=":expo-local-authentication" />
+ <option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="3.4.2" />
+ <option name="LAST_KNOWN_AGP_VERSION" value="3.4.2" />
+ </configuration>
+ </facet>
+ <facet type="android" name="Android">
+ <configuration>
+ <option name="SELECTED_BUILD_VARIANT" value="debug" />
+ <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
+ <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
+ <afterSyncTasks>
+ <task>generateDebugSources</task>
+ </afterSyncTasks>
+ <option name="ALLOW_USER_CONFIGURATION" value="false" />
+ <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
+ <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
+ <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/build/generated/res/resValues/debug" />
+ <option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
+ <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
+ <option name="PROJECT_TYPE" value="1" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager">
+ <output url="file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
+ <output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/build" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="Gradle: androidx.collection:collection:1.1.0@jar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.arch.core:core-common:2.1.0@jar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-common:2.1.0@jar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.annotation:annotation:1.1.0@jar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.biometric:biometric:1.0.1@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.appcompat:appcompat:1.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.fragment:fragment:1.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.appcompat:appcompat-resources:1.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.drawerlayout:drawerlayout:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.viewpager:viewpager:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.loader:loader:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.activity:activity:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.vectordrawable:vectordrawable-animated:1.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.vectordrawable:vectordrawable:1.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.customview:customview:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.core:core:1.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.versionedparcelable:versionedparcelable:1.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.cursoradapter:cursoradapter:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-viewmodel:2.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-runtime:2.1.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.savedstate:savedstate:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.interpolator:interpolator:1.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-livedata:2.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-livedata-core:2.0.0@aar" level="project" />
+ <orderEntry type="library" name="Gradle: androidx.arch.core:core-runtime:2.0.0@aar" level="project" />
+ <orderEntry type="module" module-name="@unimodules-core-android-unimodules-core~1" />
+ <orderEntry type="library" name="Gradle: android-android-28" level="project" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/node_modules/expo-local-authentication/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.java b/node_modules/expo-local-authentication/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.java
index babaf55..d665886 100644
--- a/node_modules/expo-local-authentication/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.java
+++ b/node_modules/expo-local-authentication/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.java
@@ -24,6 +24,7 @@ import org.unimodules.core.Promise;
import org.unimodules.core.interfaces.ActivityProvider;
import org.unimodules.core.interfaces.ExpoMethod;
import org.unimodules.core.interfaces.services.UIManager;
+import org.unimodules.core.arguments.ReadableArguments;
public class LocalAuthenticationModule extends ExportedModule {
private final BiometricManager mBiometricManager;
@@ -32,6 +33,9 @@ public class LocalAuthenticationModule extends ExportedModule {
private boolean mIsAuthenticating = false;
private ModuleRegistry mModuleRegistry;
private UIManager mUIManager;
+ private String mPromptMessage = "";
+ private String mCancelLabel = "";
+ private boolean mDisableDeviceFallback = false;
private static final int AUTHENTICATION_TYPE_FINGERPRINT = 1;
@@ -96,7 +100,7 @@ public class LocalAuthenticationModule extends ExportedModule {
}
@ExpoMethod
- public void authenticateAsync(final Promise promise) {
+ public void authenticateAsync(final ReadableArguments options, final Promise promise) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
promise.reject("E_NOT_SUPPORTED", "Cannot display biometric prompt on android versions below 6.0");
return;
@@ -130,6 +134,18 @@ public class LocalAuthenticationModule extends ExportedModule {
return;
}
+ if (options.containsKey("promptMessage")) {
+ mPromptMessage = options.getString("promptMessage");
+ }
+
+ if (options.containsKey("cancelLabel")) {
+ mCancelLabel = options.getString("cancelLabel");
+ }
+
+ if (options.containsKey("disableDeviceFallback")) {
+ mDisableDeviceFallback = options.getBoolean("disableDeviceFallback");
+ }
+
mIsAuthenticating = true;
mPromise = promise;
mCancellationSignal = new CancellationSignal();
@@ -138,10 +154,13 @@ public class LocalAuthenticationModule extends ExportedModule {
Executor executor = Executors.newSingleThreadExecutor();
BiometricPrompt biometricPrompt = new BiometricPrompt(fragmentActivity, executor, mAuthenticationCallback);
- BiometricPrompt.PromptInfo promptInfo = new BiometricPrompt.PromptInfo.Builder()
- .setDeviceCredentialAllowed(true)
- .setTitle("Authenticate")
- .build();
+ BiometricPrompt.PromptInfo.Builder promptInfoBuilder = new BiometricPrompt.PromptInfo.Builder()
+ .setDeviceCredentialAllowed(!mDisableDeviceFallback)
+ .setTitle(mPromptMessage);
+ if (mCancelLabel != null && mDisableDeviceFallback) {
+ promptInfoBuilder.setNegativeButtonText(mCancelLabel);
+ }
+ BiometricPrompt.PromptInfo promptInfo = promptInfoBuilder.build();
biometricPrompt.authenticate(promptInfo);
}
});
diff --git a/node_modules/expo-local-authentication/build/LocalAuthentication.js b/node_modules/expo-local-authentication/build/LocalAuthentication.js
index f4d4420..53c794a 100644
--- a/node_modules/expo-local-authentication/build/LocalAuthentication.js
+++ b/node_modules/expo-local-authentication/build/LocalAuthentication.js
@@ -1,6 +1,5 @@
import { UnavailabilityError } from '@unimodules/core';
import invariant from 'invariant';
-import { Platform } from 'react-native';
import ExpoLocalAuthentication from './ExpoLocalAuthentication';
import { AuthenticationType, } from './LocalAuthentication.types';
export { AuthenticationType };
@@ -31,20 +30,15 @@ export async function authenticateAsync(options = {}) {
console.warn('String argument in LocalAuthentication.authenticateAsync has been deprecated. Please use options object with `promptMessage` key instead.');
options = { promptMessage: options };
}
- if (Platform.OS === 'ios') {
- if (options.hasOwnProperty('promptMessage')) {
- invariant(typeof options.promptMessage === 'string' && options.promptMessage.length, 'LocalAuthentication.authenticateAsync : `options.promptMessage` must be a non-empty string.');
- }
- const promptMessage = options.promptMessage || 'Authenticate';
- const result = await ExpoLocalAuthentication.authenticateAsync({ ...options, promptMessage });
- if (result.warning) {
- console.warn(result.warning);
- }
- return result;
+ if (options.hasOwnProperty('promptMessage')) {
+ invariant(typeof options.promptMessage === 'string' && options.promptMessage.length, 'LocalAuthentication.authenticateAsync : `options.promptMessage` must be a non-empty string.');
}
- else {
- return await ExpoLocalAuthentication.authenticateAsync();
+ const promptMessage = options.promptMessage || 'Authenticate';
+ const result = await ExpoLocalAuthentication.authenticateAsync({ ...options, promptMessage });
+ if (result.warning) {
+ console.warn(result.warning);
}
+ return result;
}
export async function cancelAuthenticate() {
if (!ExpoLocalAuthentication.cancelAuthenticate) {
diff --git a/node_modules/expo-local-authentication/build/LocalAuthentication.js.map b/node_modules/expo-local-authentication/build/LocalAuthentication.js.map
index ca5c5a3..42df04f 100644
--- a/node_modules/expo-local-authentication/build/LocalAuthentication.js.map
+++ b/node_modules/expo-local-authentication/build/LocalAuthentication.js.map
@@ -1 +1 @@
-{"version":3,"file":"LocalAuthentication.js","sourceRoot":"","sources":["../src/LocalAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAEL,kBAAkB,GAEnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAA8B,kBAAkB,EAA6B,CAAC;AAErF,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,EAAE;QAC7C,MAAM,IAAI,mBAAmB,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAAC;KAChF;IACD,OAAO,MAAM,uBAAuB,CAAC,gBAAgB,EAAE,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iCAAiC;IACrD,IAAI,CAAC,uBAAuB,CAAC,iCAAiC,EAAE;QAC9D,MAAM,IAAI,mBAAmB,CAAC,2BAA2B,EAAE,mCAAmC,CAAC,CAAC;KACjG;IACD,OAAO,MAAM,uBAAuB,CAAC,iCAAiC,EAAE,CAAC;AAC3E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC,uBAAuB,CAAC,eAAe,EAAE;Q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AC;KAClF;IACD,MAAM,uBAAuB,CAAC,kBAAkB,EAAE,CAAC;AACrD,CAAC","sourcesContent":["import { UnavailabilityError } from '@unimodules/core';\nimport invariant from 'invariant';\nimport { Platform } from 'react-native';\n\nimport ExpoLocalAuthentication from './ExpoLocalAuthentication';\nimport {\n LocalAuthenticationOptions,\n AuthenticationType,\n LocalAuthenticationResult,\n} from './LocalAuthentication.types';\n\nexport { LocalAuthenticationOptions, AuthenticationType, LocalAuthenticationResult };\n\nexport async function hasHardwareAsync(): Promise<boolean> {\n if (!ExpoLocalAuthentication.hasHardwareAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'hasHardwareAsync');\n }\n return await ExpoLocalAuthentication.hasHardwareAsync();\n}\n\nexport async function supportedAuthenticationTypesAsync(): Promise<AuthenticationType[]> {\n if (!ExpoLocalAuthentication.supportedAuthenticationTypesAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'supportedAuthenticationTypesAsync');\n }\n return await ExpoLocalAuthentication.supportedAuthenticationTypesAsync();\n}\n\nexport async function isEnrolledAsync(): Promise<boolean> {\n if (!ExpoLocalAuthentication.isEnrolledAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'isEnrolledAsync');\n }\n return await ExpoLocalAuthentication.isEnrolledAsync();\n}\n\nexport async function authenticateAsync(\n options: LocalAuthenticationOptions = {}\n): Promise<LocalAuthenticationResult> {\n if (!ExpoLocalAuthentication.authenticateAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'authenticateAsync');\n }\n\n // Warn if using an old API - to be removed in SDK35.\n if (typeof options === 'string') {\n console.warn(\n 'String argument in LocalAuthentication.authenticateAsync has been deprecated. Please use options object with `promptMessage` key instead.'\n );\n options = { promptMessage: options };\n }\n\n if (Platform.OS === 'ios') {\n if (options.hasOwnProperty('promptMessage')) {\n invariant(\n typeof options.promptMessage === 'string' && options.promptMessage.length,\n 'LocalAuthentication.authenticateAsync : `options.promptMessage
\ No newline at end of file
+{"version":3,"file":"LocalAuthentication.js","sour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O,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;KACtC;IAED,IAAI,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE;QAC3C,SAAS,CACP,OAAO,OAAO,CAAC,aAAa,KAAK,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,EACzE,6FAA6F,CAC9F,CAAC;KACH;IAGD,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,cAAc,CAAC;IAC9D,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC,iBAAiB,CAAC,EAAE,GAAG,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IAE9F,IAAI,MAAM,CAAC,OAAO,EAAE;QAClB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;KAC9B;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,EAAE;QAC/C,MAAM,IAAI,mBAAmB,CAAC,2BAA2B,EAAE,oBAAoB,CAAC,CAAC;KAClF;IACD,MAAM,uBAAuB,CAAC,kBAAkB,EAAE,CAAC;AACrD,CAAC","sourcesContent":["import { UnavailabilityError } from '@unimodules/core';\nimport invariant from 'invariant';\nimport { Platform } from 'react-native';\n\nimport ExpoLocalAuthentication from './ExpoLocalAuthentication';\nimport {\n LocalAuthenticationOptions,\n AuthenticationType,\n LocalAuthenticationResult,\n} from './LocalAuthentication.types';\n\nexport { LocalAuthenticationOptions, AuthenticationType, LocalAuthenticationResult };\n\nexport async function hasHardwareAsync(): Promise<boolean> {\n if (!ExpoLocalAuthentication.hasHardwareAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'hasHardwareAsync');\n }\n return await ExpoLocalAuthentication.hasHardwareAsync();\n}\n\nexport async function supportedAuthenticationTypesAsync(): Promise<AuthenticationType[]> {\n if (!ExpoLocalAuthentication.supportedAuthenticationTypesAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'supportedAuthenticationTypesAsync');\n }\n return await ExpoLocalAuthentication.supportedAuthenticationTypesAsync();\n}\n\nexport async function isEnrolledAsync(): Promise<boolean> {\n if (!ExpoLocalAuthentication.isEnrolledAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'isEnrolledAsync');\n }\n return await ExpoLocalAuthentication.isEnrolledAsync();\n}\n\nexport async function authenticateAsync(\n options: LocalAuthenticationOptions = {}\n): Promise<LocalAuthenticationResult> {\n if (!ExpoLocalAuthentication.authenticateAsync) {\n throw new UnavailabilityError('expo-local-authentication', 'authenticateAsync');\n }\n\n // Warn if using an old API - to be removed in SDK35.\n if (typeof options === 'string') {\n console.warn(\n 'String argument in LocalAuthentication.authenticateAsync has been deprecated. Please use options object with `promptMessage` key instead.'\n );\n options = { promptMessage: options };\n }\n\n if (options.hasOwnProperty('promptMessage')) {\n invariant(\n typeof options.promptMessage === 'string' && options.promptMessage.length,\n 'LocalAuthentication.authenticateAsync : `options.promptMessage` must be a non-empty string.'\n );\n }\n\n\n const promptMessage = options.promptMessage || 'Authenticate';\n const result = await ExpoLocalAuthentication.authenticateAsync({
\ No newline at end of file
diff --git a/node_modules/expo-local-authentication/build/LocalAuthentication.types.d.ts b/node_modules/expo-local-authentication/build/LocalAuthentication.types.d.ts
index 4732e60..17fa82d 100644
--- a/node_modules/expo-local-authentication/build/LocalAuthentication.types.d.ts
+++ b/node_modules/expo-local-authentication/build/LocalAuthentication.types.d.ts
@@ -11,6 +11,6 @@ export declare enum AuthenticationType {
export declare type LocalAuthenticationOptions = {
promptMessage?: string;
cancelLabel?: string;
- fallbackLabel?: string;
disableDeviceFallback?: boolean;
+ fallbackLabel?: string;
};
diff --git a/node_modules/expo-local-authentication/build/LocalAuthentication.types.js.map b/node_modules/expo-local-authentication/build/LocalAuthentication.types.js.map
index c31dd6d..e413ea0 100644
--- a/node_modules/expo-local-authentication/build/LocalAuthentication.types.js.map
+++ b/node_modules/expo-local-authentication/build/LocalAuthentication.types.js.map
@@ -1 +1 @@
-{"version":3,"file":"LocalAuthentication.types.js","sourceRoot":"","sources":["../src/LocalAuthentication.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yEAAe,CAAA;IACf,uFAAsB,CAAA;AACxB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["export type LocalAuthenticationResult = { success: true } | { success: false; error: string };\n\nexport enum AuthenticationType {\n FINGERPRINT = 1,\n FACIAL_RECOGNITION = 2,\n}\n\nexport type LocalAuthenticationOptions = {\n // iOS only\n promptMessage?: string;\n cancelLabel?: string;\n fallbackLabel?: string;\n disableDeviceFallback?: boolean;\n};\n"]}
\ No newline at end of file
+{"version":3,"file":"LocalAuthentication.types.js","sourceRoot":"","sources":["../src/LocalAuthentication.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yEAAe,CAAA;IACf,uFAAsB,CAAA;AACxB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["export type LocalAuthenticationResult = { success: true } | { success: false; error: string };\n\nexport enum AuthenticationType {\n FINGERPRINT = 1,\n FACIAL_RECOGNITION = 2,\n}\n\nexport type LocalAuthenticationOptions = {\n promptMessage?: string;\n cancelLabel?: string;\n disableDeviceFallback?: boolean;\n // iOS only\n fallbackLabel?: string;\n};\n"]}
\ No newline at end of file