Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expo-local-authentication

Package Overview
Dependencies
Maintainers
21
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-local-authentication - npm Package Compare versions

Comparing version 7.0.0 to 8.0.0

src/__tests__/LocalAuthentication-test.android.ts

9

build/LocalAuthentication.js

@@ -25,3 +25,3 @@ import { UnavailabilityError } from '@unimodules/core';

}
export async function authenticateAsync(options = { promptMessage: 'Authenticate' }) {
export async function authenticateAsync(options = {}) {
if (!ExpoLocalAuthentication.authenticateAsync) {

@@ -36,4 +36,7 @@ throw new UnavailabilityError('expo-local-authentication', 'authenticateAsync');

if (Platform.OS === 'ios') {
invariant(typeof options.promptMessage === 'string' && options.promptMessage.length, 'LocalAuthentication.authenticateAsync must be called with a non-empty `options.promptMessage` string on iOS');
const result = await ExpoLocalAuthentication.authenticateAsync(options);
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) {

@@ -40,0 +43,0 @@ console.warn(result.warning);

@@ -12,4 +12,4 @@ export declare type LocalAuthenticationResult = {

export declare type AuthOptions = {
promptMessage: string;
promptMessage?: string;
fallbackLabel?: string;
};
{
"name": "expo-local-authentication",
"version": "7.0.0",
"version": "8.0.0",
"description": "Provides an API for FaceID and TouchID (iOS) or the Fingerprint API (Android) to authenticate the user with a face or fingerprint scan.",

@@ -50,3 +50,3 @@ "main": "build/LocalAuthentication.js",

},
"gitHead": "4e13b3cb88d9205f14bee7764038ab2dd9ef1fbd"
"gitHead": "ec7878b9ce54f2537721218ae0fe4017e4004806"
}

@@ -21,3 +21,3 @@ # expo-local-authentication

```
npm install expo-local-authentication
expo install expo-local-authentication
```

@@ -24,0 +24,0 @@

@@ -36,3 +36,3 @@ import { UnavailabilityError } from '@unimodules/core';

export async function authenticateAsync(
options: AuthOptions = { promptMessage: 'Authenticate' }
options: AuthOptions = {}
): Promise<LocalAuthenticationResult> {

@@ -52,8 +52,11 @@ if (!ExpoLocalAuthentication.authenticateAsync) {

if (Platform.OS === 'ios') {
invariant(
typeof options.promptMessage === 'string' && options.promptMessage.length,
'LocalAuthentication.authenticateAsync must be called with a non-empty `options.promptMessage` string on iOS'
);
if (options.hasOwnProperty('promptMessage')) {
invariant(
typeof options.promptMessage === 'string' && options.promptMessage.length,
'LocalAuthentication.authenticateAsync : `options.promptMessage` must be a non-empty string.'
);
}
const result = await ExpoLocalAuthentication.authenticateAsync(options);
const promptMessage = options.promptMessage || 'Authenticate';
const result = await ExpoLocalAuthentication.authenticateAsync({ ...options, promptMessage });

@@ -60,0 +63,0 @@ if (result.warning) {

@@ -10,4 +10,4 @@ export type LocalAuthenticationResult = { success: true } | { success: false; error: string };

// iOS only
promptMessage: string;
promptMessage?: string;
fallbackLabel?: string;
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc