expo-secure-store
Advanced tools
Comparing version 12.8.1 to 13.0.0
@@ -1,5 +0,3 @@ | ||
declare const _default: { | ||
readonly name: string; | ||
}; | ||
declare const _default: {}; | ||
export default _default; | ||
//# sourceMappingURL=ExpoSecureStore.web.d.ts.map |
@@ -1,6 +0,2 @@ | ||
export default { | ||
get name() { | ||
return 'ExpoSecureStore'; | ||
}, | ||
}; | ||
export default {}; | ||
//# sourceMappingURL=ExpoSecureStore.web.js.map |
@@ -130,2 +130,7 @@ export type KeychainAccessibilityConstant = number; | ||
export declare function getItem(key: string, options?: SecureStoreOptions): string | null; | ||
/** | ||
* Checks if the value can be saved with `requireAuthentication` option enabled. | ||
* @return `true` if the device supports biometric authentication and the enrolled method is sufficiently secure. Otherwise, returns `false`. | ||
*/ | ||
export declare function canUseBiometricAuthentication(): boolean; | ||
//# sourceMappingURL=SecureStore.d.ts.map |
@@ -132,2 +132,9 @@ import ExpoSecureStore from './ExpoSecureStore'; | ||
} | ||
/** | ||
* Checks if the value can be saved with `requireAuthentication` option enabled. | ||
* @return `true` if the device supports biometric authentication and the enrolled method is sufficiently secure. Otherwise, returns `false`. | ||
*/ | ||
export function canUseBiometricAuthentication() { | ||
return ExpoSecureStore.canUseBiometricAuthentication(); | ||
} | ||
function ensureValidKey(key) { | ||
@@ -146,3 +153,3 @@ if (!isValidKey(key)) { | ||
if (byteCount(value) > VALUE_BYTES_LIMIT) { | ||
console.warn('Provided value to SecureStore is larger than 2048 bytes. An attempt to store such a value will throw an error in SDK 35.'); | ||
console.warn('Value being stored in SecureStore is larger than 2048 bytes and it may not be stored successfully. In a future SDK version, this call may throw an error.'); | ||
} | ||
@@ -149,0 +156,0 @@ return true; |
@@ -13,4 +13,16 @@ # Changelog | ||
## 12.8.1 — 2023-12-19 | ||
## 13.0.0 — 2024-04-18 | ||
### 🎉 New features | ||
- Add ability to disable permissions in config plugin by passing `false` instead of permission messages. ([#28107](https://github.com/expo/expo/pull/28107) by [@EvanBacon](https://github.com/EvanBacon)) | ||
- Add `canUseBiometricAuthentication` function. ([#26767](https://github.com/expo/expo/pull/26767) by [@behenate](https://github.com/behenate)) | ||
### 💡 Others | ||
- drop unused web `name` property. ([#27437](https://github.com/expo/expo/pull/27437) by [@EvanBacon](https://github.com/EvanBacon)) | ||
- Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo)) | ||
## 12.8.1 - 2023-12-19 | ||
_This version does not introduce any user-facing changes._ | ||
@@ -17,0 +29,0 @@ |
{ | ||
"name": "expo-secure-store", | ||
"version": "12.8.1", | ||
"description": "Provides a way to encrypt and securely store key–value pairs locally on the device.", | ||
"version": "13.0.0", | ||
"description": "Provides a way to encrypt and securely store key-value pairs locally on the device.", | ||
"main": "build/SecureStore.js", | ||
@@ -45,3 +45,3 @@ "types": "build/SecureStore.d.ts", | ||
}, | ||
"gitHead": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431" | ||
"gitHead": "4165b8d72e1b9a1889c2767534cc619e21468110" | ||
} |
import { ConfigPlugin } from '@expo/config-plugins'; | ||
declare const _default: ConfigPlugin<void | { | ||
faceIDPermission?: string | undefined; | ||
faceIDPermission?: string | false | undefined; | ||
}>; | ||
export default _default; |
@@ -7,8 +7,8 @@ "use strict"; | ||
const withSecureStore = (config, { faceIDPermission } = {}) => { | ||
return (0, config_plugins_1.withInfoPlist)(config, (config) => { | ||
config.modResults.NSFaceIDUsageDescription = | ||
faceIDPermission || config.modResults.NSFaceIDUsageDescription || FACEID_USAGE; | ||
return config; | ||
return config_plugins_1.IOSConfig.Permissions.createPermissionsPlugin({ | ||
NSFaceIDUsageDescription: FACEID_USAGE, | ||
})(config, { | ||
NSFaceIDUsageDescription: faceIDPermission, | ||
}); | ||
}; | ||
exports.default = (0, config_plugins_1.createRunOncePlugin)(withSecureStore, pkg.name, pkg.version); |
@@ -1,2 +0,2 @@ | ||
import { ConfigPlugin, createRunOncePlugin, withInfoPlist } from '@expo/config-plugins'; | ||
import { ConfigPlugin, IOSConfig, createRunOncePlugin } from '@expo/config-plugins'; | ||
@@ -9,10 +9,9 @@ const pkg = require('expo-secure-store/package.json'); | ||
{ | ||
faceIDPermission?: string; | ||
faceIDPermission?: string | false; | ||
} | void | ||
> = (config, { faceIDPermission } = {}) => { | ||
return withInfoPlist(config, (config) => { | ||
config.modResults.NSFaceIDUsageDescription = | ||
faceIDPermission || config.modResults.NSFaceIDUsageDescription || FACEID_USAGE; | ||
return config; | ||
return IOSConfig.Permissions.createPermissionsPlugin({ | ||
NSFaceIDUsageDescription: FACEID_USAGE, | ||
})(config, { | ||
NSFaceIDUsageDescription: faceIDPermission, | ||
}); | ||
@@ -19,0 +18,0 @@ }; |
@@ -1,5 +0,1 @@ | ||
export default { | ||
get name(): string { | ||
return 'ExpoSecureStore'; | ||
}, | ||
}; | ||
export default {}; |
@@ -205,2 +205,10 @@ import ExpoSecureStore from './ExpoSecureStore'; | ||
/** | ||
* Checks if the value can be saved with `requireAuthentication` option enabled. | ||
* @return `true` if the device supports biometric authentication and the enrolled method is sufficiently secure. Otherwise, returns `false`. | ||
*/ | ||
export function canUseBiometricAuthentication(): boolean { | ||
return ExpoSecureStore.canUseBiometricAuthentication(); | ||
} | ||
function ensureValidKey(key: string) { | ||
@@ -224,3 +232,3 @@ if (!isValidKey(key)) { | ||
console.warn( | ||
'Provided value to SecureStore is larger than 2048 bytes. An attempt to store such a value will throw an error in SDK 35.' | ||
'Value being stored in SecureStore is larger than 2048 bytes and it may not be stored successfully. In a future SDK version, this call may throw an error.' | ||
); | ||
@@ -227,0 +235,0 @@ } |
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
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
Sorry, the diff of this file is not supported yet
102076
146156
615
3
16