From 8852b5bfedf45ef1c3ddc02e1ef47980493fb9e8 Mon Sep 17 00:00:00 2001 From: MazurDorian Date: Mon, 11 Nov 2024 22:37:39 +0200 Subject: [PATCH] Release 9.2.0 --- package.json | 2 +- website/docs/choosing-storage-type.md | 219 ++++++++++++++++++ website/docs/faq.md | 2 +- website/docs/usage.md | 2 +- website/sidebars.ts | 5 + .../api/enumerations/ACCESSIBLE.md | 75 ++++++ .../api/enumerations/ACCESS_CONTROL.md | 87 +++++++ .../api/enumerations/AUTHENTICATION_TYPE.md | 27 +++ .../api/enumerations/BIOMETRY_TYPE.md | 99 ++++++++ .../api/enumerations/SECURITY_LEVEL.md | 44 ++++ .../api/enumerations/SECURITY_RULES.md | 31 +++ .../api/enumerations/STORAGE_TYPE.md | 47 ++++ .../api/functions/canImplyAuthentication.md | 32 +++ .../getAllGenericPasswordServices.md | 22 ++ .../api/functions/getGenericPassword.md | 32 +++ .../api/functions/getInternetCredentials.md | 36 +++ .../api/functions/getSecurityLevel.md | 32 +++ .../api/functions/getSupportedBiometryType.md | 22 ++ .../api/functions/hasGenericPassword.md | 28 +++ .../api/functions/hasInternetCredentials.md | 28 +++ .../functions/requestSharedWebCredentials.md | 30 +++ .../api/functions/resetGenericPassword.md | 28 +++ .../api/functions/resetInternetCredentials.md | 26 +++ .../api/functions/setGenericPassword.md | 35 +++ .../api/functions/setInternetCredentials.md | 39 ++++ .../api/functions/setSharedWebCredentials.md | 40 ++++ .../versioned_docs/version-9.1.0/api/index.md | 40 ++++ .../api/type-aliases/AccessControlOption.md | 15 ++ .../api/type-aliases/AuthenticationPrompt.md | 47 ++++ .../type-aliases/AuthenticationTypeOption.md | 25 ++ .../api/type-aliases/BaseOptions.md | 37 +++ .../api/type-aliases/GetOptions.md | 48 ++++ .../version-9.1.0/api/type-aliases/Result.md | 23 ++ .../api/type-aliases/SetOptions.md | 63 +++++ .../api/type-aliases/SharedWebCredentials.md | 21 ++ .../api/type-aliases/UserCredentials.md | 23 ++ website/versioned_docs/version-9.1.0/faq.md | 46 ++++ website/versioned_docs/version-9.1.0/index.md | 53 +++++ website/versioned_docs/version-9.1.0/jest.md | 176 ++++++++++++++ website/versioned_docs/version-9.1.0/usage.md | 110 +++++++++ .../version-9.1.0-sidebars.json | 193 +++++++++++++++ 41 files changed, 1987 insertions(+), 3 deletions(-) create mode 100644 website/docs/choosing-storage-type.md create mode 100644 website/versioned_docs/version-9.1.0/api/enumerations/ACCESSIBLE.md create mode 100644 website/versioned_docs/version-9.1.0/api/enumerations/ACCESS_CONTROL.md create mode 100644 website/versioned_docs/version-9.1.0/api/enumerations/AUTHENTICATION_TYPE.md create mode 100644 website/versioned_docs/version-9.1.0/api/enumerations/BIOMETRY_TYPE.md create mode 100644 website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_LEVEL.md create mode 100644 website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_RULES.md create mode 100644 website/versioned_docs/version-9.1.0/api/enumerations/STORAGE_TYPE.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/canImplyAuthentication.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/getAllGenericPasswordServices.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/getGenericPassword.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/getInternetCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/getSecurityLevel.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/getSupportedBiometryType.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/hasGenericPassword.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/hasInternetCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/requestSharedWebCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/resetGenericPassword.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/resetInternetCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/setGenericPassword.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/setInternetCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/api/functions/setSharedWebCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/api/index.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/AccessControlOption.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationPrompt.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationTypeOption.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/BaseOptions.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/GetOptions.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/Result.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/SetOptions.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/SharedWebCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/api/type-aliases/UserCredentials.md create mode 100644 website/versioned_docs/version-9.1.0/faq.md create mode 100644 website/versioned_docs/version-9.1.0/index.md create mode 100644 website/versioned_docs/version-9.1.0/jest.md create mode 100644 website/versioned_docs/version-9.1.0/usage.md create mode 100644 website/versioned_sidebars/version-9.1.0-sidebars.json diff --git a/package.json b/package.json index ff7b3212..ea410b20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-keychain", - "version": "9.1.0", + "version": "9.2.0", "description": "Keychain Access for React Native", "main": "./lib/commonjs/index.js", "module": "./lib/module/index", diff --git a/website/docs/choosing-storage-type.md b/website/docs/choosing-storage-type.md new file mode 100644 index 00000000..d34147ff --- /dev/null +++ b/website/docs/choosing-storage-type.md @@ -0,0 +1,219 @@ +--- +id: choosing-storage-type +title: '[Android] Choosing Storage Type' +--- + +On Android, securing sensitive data requires careful consideration of different storage types. This guide helps you choose the right storage type. + +## Security Levels + +We offer three security levels for data storage: + +### 1. High Security (with Biometric Authentication) + +- **AES_GCM**: Symmetric encryption with biometric protection +- **RSA**: Asymmetric encryption with biometric protection +- Best for: Passwords, personal data, sensitive keys + +### 2. Medium Security (without Authentication) + +- **AES_GCM_NO_AUTH**: Symmetric encryption without biometric requirements +- Best for: Cached data, non-sensitive encrypted data + +### 3. Legacy/Deprecated + +- **AES_CBC**, **FB** (Facebook Conceal) +- ⚠️ Not recommended for new implementations + +## Storage Type Selection Guide + +### Use AES_GCM (High Security) for: + +- User credentials (passwords, tokens) +- Personal information (SSN, credit cards) +- Encryption keys (symmetric keys) + +```typescript +import { setGenericPassword, STORAGE_TYPE } from 'react-native-keychain'; + +await setGenericPassword( + 'username', + 'password123', + { + accessControl: ACCESS_CONTROL.BIOMETRY_ANY, + accessible: ACCESSIBLE.WHEN_UNLOCKED, + storage: STORAGE_TYPE.AES_GCM, + } +); +``` + +### Use RSA (High Security) for: + +- Digital signatures +- Key exchange +- Public/private key operations + +```typescript +import { setGenericPassword, STORAGE_TYPE } from 'react-native-keychain'; + +await setGenericPassword( + 'auth_key_id', + privateKeyData, + { + accessControl: ACCESS_CONTROL.BIOMETRY_ANY, + accessible: ACCESSIBLE.WHEN_UNLOCKED, + storage: STORAGE_TYPE.RSA, + } +); +``` + +### Use AES_GCM_NO_AUTH (Medium Security) for: + +- Cache data +- Local data +- Temporary storage + +```typescript +import { setGenericPassword, STORAGE_TYPE } from 'react-native-keychain'; + +await setGenericPassword( + 'cache_key', + cacheData, + { + accessible: ACCESSIBLE.WHEN_UNLOCKED, + storage: STORAGE_TYPE.AES_GCM_NO_AUTH, + } +); +``` + +## Complete Examples + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + +```typescript +import { + setGenericPassword, + getGenericPassword, + getSupportedBiometryType, + STORAGE_TYPE, + ACCESS_CONTROL, + ACCESSIBLE, +} from 'react-native-keychain'; + +// Store credentials with biometric protection +async function storeCredentials(username: string, password: string) { + try { + // Check biometric availability + const biometryType = await getSupportedBiometryType(); + + // Handle biometric requirement + if (options.requireBiometrics && !biometryType) { + throw new Error('Biometric authentication is required but not available'); + } + + await setGenericPassword(username, password, { + accessControl: ACCESS_CONTROL.BIOMETRY_ANY, + accessible: ACCESSIBLE.WHEN_UNLOCKED, + storage: STORAGE_TYPE.AES_GCM, + authenticationType: AUTHENTICATION_TYPE.BIOMETRICS, + }); + console.log('Credentials stored successfully'); + } catch (error) { + console.error('Error storing credentials:', error); + } +} + +// Retrieve credentials (will trigger biometric prompt) +async function retrieveCredentials() { + try { + const credentials = await getGenericPassword(); + if (credentials) { + console.log('Username:', credentials.username); + console.log('Password:', credentials.password); + return credentials; + } + return null; + } catch (error) { + console.error('Error retrieving credentials:', error); + return null; + } +} +``` + + + +```typescript +import { + setGenericPassword, + getGenericPassword, + STORAGE_TYPE, + ACCESS_CONTROL, + ACCESSIBLE, +} from 'react-native-keychain'; + +// Store credentials with biometric protection +async function storeCredentials(username: string, password: string) { + try { + await setGenericPassword(username, password, { + accessControl: ACCESS_CONTROL.BIOMETRY_ANY, + accessible: ACCESSIBLE.WHEN_UNLOCKED, + storage: STORAGE_TYPE.AES_GCM_NO_AUTH, + authenticationType: AUTHENTICATION_TYPE.BIOMETRICS, + }); + console.log('Credentials stored successfully'); + } catch (error) { + console.error('Error storing credentials:', error); + } +} + +// Retrieve credentials (will trigger biometric prompt) +async function retrieveCredentials() { + try { + const credentials = await getGenericPassword(); + if (credentials) { + console.log('Username:', credentials.username); + console.log('Password:', credentials.password); + return credentials; + } + return null; + } catch (error) { + console.error('Error retrieving credentials:', error); + return null; + } +} +``` + + + +## Security Considerations + +### AES_GCM +- Requires biometric authentication for both encryption and decryption +- Uses 256-bit keys +- Provides authenticated encryption (confidentiality + integrity) +- Best choice for most sensitive data + +### RSA +- Requires biometric authentication for private key operations +- Uses 2048-bit keys +- Limited by maximum encryption size +- Best for asymmetric operations + +### AES_GCM_NO_AUTH +- No biometric requirement +- Still provides authenticated encryption +- Good balance of security and usability for non-sensitive data + + +## Best Practices + +1. Always use biometric protection (`AES_GCM` or `RSA`) for sensitive user data +2. Use `AES_GCM_NO_AUTH` for non-sensitive but private app data +3. Handle biometric authentication errors gracefully +4. Provide fallback mechanisms when biometrics are not available +5. Clear sensitive data when the user logs out +6. Don't store sensitive data in plain text or with deprecated storage types diff --git a/website/docs/faq.md b/website/docs/faq.md index 51d2a0b3..695a710b 100644 --- a/website/docs/faq.md +++ b/website/docs/faq.md @@ -40,7 +40,7 @@ Ensure the `rules` property is set to the string value `AUTOMATIC_UPGRADE`. **A:** To force a specific encryption level, call: ```tsx -setGenericPassword({ ...otherProps, storage: "AES" }); +setGenericPassword({ ...otherProps, storage: "AES_GCM_NO_AUTH" }); ``` > **Note:** If you attempt to force `RSA` storage when biometrics are not available, the call will be rejected with an error related to the device's biometric configuration. \ No newline at end of file diff --git a/website/docs/usage.md b/website/docs/usage.md index 25f5dd38..cedb8904 100644 --- a/website/docs/usage.md +++ b/website/docs/usage.md @@ -49,7 +49,7 @@ The module automatically selects the appropriate `CipherStorage` implementation - **API levels 16-22**: Uses Facebook Conceal for encryption/decryption. - **API level 23+**: Uses Android Keystore for encryption/decryption. -Encrypted data is stored in `SharedPreferences`. +Encrypted data is stored in `Jetpack DataStore`. #### Multiple Credentials diff --git a/website/sidebars.ts b/website/sidebars.ts index ffd60436..24219bce 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -12,6 +12,11 @@ const sidebars: SidebarsConfig = { id: 'usage', label: 'Usage', }, + { + type: 'doc', + id: 'choosing-storage-type', + label: '[Android] Choosing Storage Type', + }, { type: 'doc', id: 'jest', diff --git a/website/versioned_docs/version-9.1.0/api/enumerations/ACCESSIBLE.md b/website/versioned_docs/version-9.1.0/api/enumerations/ACCESSIBLE.md new file mode 100644 index 00000000..1a0c7ac9 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/enumerations/ACCESSIBLE.md @@ -0,0 +1,75 @@ +# Enumeration: ACCESSIBLE + +Enum representing when a keychain item is accessible. + +## Enumeration Members + +### AFTER\_FIRST\_UNLOCK + +> **AFTER\_FIRST\_UNLOCK**: `"AccessibleAfterFirstUnlock"` + +The data in the keychain item cannot be accessed after a restart until the device has been unlocked once by the user. + +#### Defined in + +[enums.ts:12](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L12) + +*** + +### AFTER\_FIRST\_UNLOCK\_THIS\_DEVICE\_ONLY + +> **AFTER\_FIRST\_UNLOCK\_THIS\_DEVICE\_ONLY**: `"AccessibleAfterFirstUnlockThisDeviceOnly"` + +The data in the keychain item cannot be accessed after a restart until the device has been unlocked once by the user. Items with this attribute never migrate to a new device. + +#### Defined in + +[enums.ts:20](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L20) + +*** + +### ALWAYS + +> **ALWAYS**: `"AccessibleAlways"` + +The data in the keychain item can always be accessed regardless of whether the device is locked. + +#### Defined in + +[enums.ts:14](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L14) + +*** + +### WHEN\_PASSCODE\_SET\_THIS\_DEVICE\_ONLY + +> **WHEN\_PASSCODE\_SET\_THIS\_DEVICE\_ONLY**: `"AccessibleWhenPasscodeSetThisDeviceOnly"` + +The data in the keychain can only be accessed when the device is unlocked. Only available if a passcode is set on the device. Items with this attribute never migrate to a new device. + +#### Defined in + +[enums.ts:16](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L16) + +*** + +### WHEN\_UNLOCKED + +> **WHEN\_UNLOCKED**: `"AccessibleWhenUnlocked"` + +The data in the keychain item can be accessed only while the device is unlocked by the user. + +#### Defined in + +[enums.ts:10](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L10) + +*** + +### WHEN\_UNLOCKED\_THIS\_DEVICE\_ONLY + +> **WHEN\_UNLOCKED\_THIS\_DEVICE\_ONLY**: `"AccessibleWhenUnlockedThisDeviceOnly"` + +The data in the keychain item can be accessed only while the device is unlocked by the user. Items with this attribute do not migrate to a new device. + +#### Defined in + +[enums.ts:18](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L18) diff --git a/website/versioned_docs/version-9.1.0/api/enumerations/ACCESS_CONTROL.md b/website/versioned_docs/version-9.1.0/api/enumerations/ACCESS_CONTROL.md new file mode 100644 index 00000000..100b2900 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/enumerations/ACCESS_CONTROL.md @@ -0,0 +1,87 @@ +# Enumeration: ACCESS\_CONTROL + +Enum representing access control options. + +## Enumeration Members + +### APPLICATION\_PASSWORD + +> **APPLICATION\_PASSWORD**: `"ApplicationPassword"` + +Constraint to use an application-provided password for data encryption key generation. + +#### Defined in + +[enums.ts:36](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L36) + +*** + +### BIOMETRY\_ANY + +> **BIOMETRY\_ANY**: `"BiometryAny"` + +Constraint to access an item with Touch ID for any enrolled fingers. + +#### Defined in + +[enums.ts:30](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L30) + +*** + +### BIOMETRY\_ANY\_OR\_DEVICE\_PASSCODE + +> **BIOMETRY\_ANY\_OR\_DEVICE\_PASSCODE**: `"BiometryAnyOrDevicePasscode"` + +Constraint to access an item with Touch ID for any enrolled fingers or passcode. + +#### Defined in + +[enums.ts:38](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L38) + +*** + +### BIOMETRY\_CURRENT\_SET + +> **BIOMETRY\_CURRENT\_SET**: `"BiometryCurrentSet"` + +Constraint to access an item with Touch ID for currently enrolled fingers. + +#### Defined in + +[enums.ts:32](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L32) + +*** + +### BIOMETRY\_CURRENT\_SET\_OR\_DEVICE\_PASSCODE + +> **BIOMETRY\_CURRENT\_SET\_OR\_DEVICE\_PASSCODE**: `"BiometryCurrentSetOrDevicePasscode"` + +Constraint to access an item with Touch ID for currently enrolled fingers or passcode. + +#### Defined in + +[enums.ts:40](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L40) + +*** + +### DEVICE\_PASSCODE + +> **DEVICE\_PASSCODE**: `"DevicePasscode"` + +Constraint to access an item with the device passcode. + +#### Defined in + +[enums.ts:34](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L34) + +*** + +### USER\_PRESENCE + +> **USER\_PRESENCE**: `"UserPresence"` + +Constraint to access an item with either Touch ID or passcode. + +#### Defined in + +[enums.ts:28](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L28) diff --git a/website/versioned_docs/version-9.1.0/api/enumerations/AUTHENTICATION_TYPE.md b/website/versioned_docs/version-9.1.0/api/enumerations/AUTHENTICATION_TYPE.md new file mode 100644 index 00000000..243bd783 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/enumerations/AUTHENTICATION_TYPE.md @@ -0,0 +1,27 @@ +# Enumeration: AUTHENTICATION\_TYPE + +Enum representing authentication types. + +## Enumeration Members + +### BIOMETRICS + +> **BIOMETRICS**: `"AuthenticationWithBiometrics"` + +Device owner is going to be authenticated using a biometric method (Touch ID or Face ID). + +#### Defined in + +[enums.ts:50](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L50) + +*** + +### DEVICE\_PASSCODE\_OR\_BIOMETRICS + +> **DEVICE\_PASSCODE\_OR\_BIOMETRICS**: `"AuthenticationWithBiometricsDevicePasscode"` + +Device owner is going to be authenticated by biometry or device passcode. + +#### Defined in + +[enums.ts:48](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L48) diff --git a/website/versioned_docs/version-9.1.0/api/enumerations/BIOMETRY_TYPE.md b/website/versioned_docs/version-9.1.0/api/enumerations/BIOMETRY_TYPE.md new file mode 100644 index 00000000..06b8aca5 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/enumerations/BIOMETRY_TYPE.md @@ -0,0 +1,99 @@ +# Enumeration: BIOMETRY\_TYPE + +Enum representing types of biometric authentication supported by the device. + +## Enumeration Members + +### FACE + +> **FACE**: `"Face"` + +Device supports authentication with Face Recognition. + +#### Platform + +Android + +#### Defined in + +[enums.ts:93](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L93) + +*** + +### FACE\_ID + +> **FACE\_ID**: `"FaceID"` + +Device supports authentication with Face ID. + +#### Platform + +iOS + +#### Defined in + +[enums.ts:81](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L81) + +*** + +### FINGERPRINT + +> **FINGERPRINT**: `"Fingerprint"` + +Device supports authentication with Fingerprint. + +#### Platform + +Android + +#### Defined in + +[enums.ts:89](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L89) + +*** + +### IRIS + +> **IRIS**: `"Iris"` + +Device supports authentication with Iris Recognition. + +#### Platform + +Android + +#### Defined in + +[enums.ts:97](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L97) + +*** + +### OPTIC\_ID + +> **OPTIC\_ID**: `"OpticID"` + +Device supports authentication with Optic ID. + +#### Platform + +visionOS + +#### Defined in + +[enums.ts:85](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L85) + +*** + +### TOUCH\_ID + +> **TOUCH\_ID**: `"TouchID"` + +Device supports authentication with Touch ID. + +#### Platform + +iOS + +#### Defined in + +[enums.ts:77](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L77) diff --git a/website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_LEVEL.md b/website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_LEVEL.md new file mode 100644 index 00000000..1a312f7a --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_LEVEL.md @@ -0,0 +1,44 @@ +# Enumeration: SECURITY\_LEVEL + +Enum representing security levels. + +## Platform + +Android + +## Enumeration Members + +### ANY + +> **ANY**: `number` + +No security guarantees needed (default value). Credentials can be stored in FB Secure Storage. + +#### Defined in + +[enums.ts:67](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L67) + +*** + +### SECURE\_HARDWARE + +> **SECURE\_HARDWARE**: `number` + +Requires for the key to be stored on a secure hardware (Trusted Execution Environment or Secure Environment). +Read this article for more information: https://developer.android.com/privacy-and-security/keystore#ExtractionPrevention + +#### Defined in + +[enums.ts:64](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L64) + +*** + +### SECURE\_SOFTWARE + +> **SECURE\_SOFTWARE**: `number` + +Requires for the key to be stored in the Android Keystore, separate from the encrypted data. + +#### Defined in + +[enums.ts:59](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L59) diff --git a/website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_RULES.md b/website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_RULES.md new file mode 100644 index 00000000..718c5930 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/enumerations/SECURITY_RULES.md @@ -0,0 +1,31 @@ +# Enumeration: SECURITY\_RULES + +Enum representing security rules for storage. + +## Platform + +Android + +## Enumeration Members + +### AUTOMATIC\_UPGRADE + +> **AUTOMATIC\_UPGRADE**: `"automaticUpgradeToMoreSecuredStorage"` + +Upgrade secret to the best available storage as soon as it is available and user request secret extraction. Upgrade not applied till we request the secret. This rule only applies to secrets stored with FacebookConseal. + +#### Defined in + +[enums.ts:123](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L123) + +*** + +### NONE + +> **NONE**: `"none"` + +No special security rules applied. + +#### Defined in + +[enums.ts:121](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L121) diff --git a/website/versioned_docs/version-9.1.0/api/enumerations/STORAGE_TYPE.md b/website/versioned_docs/version-9.1.0/api/enumerations/STORAGE_TYPE.md new file mode 100644 index 00000000..27ad0b02 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/enumerations/STORAGE_TYPE.md @@ -0,0 +1,47 @@ +# Enumeration: STORAGE\_TYPE + +Enum representing storage types. + +## Platform + +Android + +## Enumeration Members + +### AES + +> **AES**: `"KeystoreAESCBC"` + +Encryptions without human interaction. + +#### Defined in + +[enums.ts:110](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L110) + +*** + +### ~~FB~~ + +> **FB**: `"FacebookConceal"` + +Facebook compatibility cipher. + +#### Deprecated + +Facebook Conceal was deprecated and archived in Mar 3, 2020. https://github.com/facebookarchive/conceal + +#### Defined in + +[enums.ts:108](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L108) + +*** + +### RSA + +> **RSA**: `"KeystoreRSAECB"` + +Encryption with biometrics. + +#### Defined in + +[enums.ts:112](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/enums.ts#L112) diff --git a/website/versioned_docs/version-9.1.0/api/functions/canImplyAuthentication.md b/website/versioned_docs/version-9.1.0/api/functions/canImplyAuthentication.md new file mode 100644 index 00000000..c590fdac --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/canImplyAuthentication.md @@ -0,0 +1,32 @@ +# Function: canImplyAuthentication() + +> **canImplyAuthentication**(`options`?): `Promise`\<`boolean`\> + +Checks if the current device supports the specified authentication policy. + +## Parameters + +• **options?**: [`AuthenticationTypeOption`](../type-aliases/AuthenticationTypeOption.md) + +A keychain options object. + +## Returns + +`Promise`\<`boolean`\> + +Resolves to `true` when supported, otherwise `false`. + +## Platform + +iOS + +## Example + +```typescript +const canAuthenticate = await Keychain.canImplyAuthentication(); +console.log('Can imply authentication:', canAuthenticate); +``` + +## Defined in + +[index.ts:332](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L332) diff --git a/website/versioned_docs/version-9.1.0/api/functions/getAllGenericPasswordServices.md b/website/versioned_docs/version-9.1.0/api/functions/getAllGenericPasswordServices.md new file mode 100644 index 00000000..fd8205b9 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/getAllGenericPasswordServices.md @@ -0,0 +1,22 @@ +# Function: getAllGenericPasswordServices() + +> **getAllGenericPasswordServices**(): `Promise`\<`string`[]\> + +Gets all service keys used in generic password keychain entries. + +## Returns + +`Promise`\<`string`[]\> + +Resolves to an array of strings representing service keys. + +## Example + +```typescript +const services = await Keychain.getAllGenericPasswordServices(); +console.log('Services:', services); +``` + +## Defined in + +[index.ts:131](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L131) diff --git a/website/versioned_docs/version-9.1.0/api/functions/getGenericPassword.md b/website/versioned_docs/version-9.1.0/api/functions/getGenericPassword.md new file mode 100644 index 00000000..ba9d2695 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/getGenericPassword.md @@ -0,0 +1,32 @@ +# Function: getGenericPassword() + +> **getGenericPassword**(`serviceOrOptions`?): `Promise`\<`false` \| [`UserCredentials`](../type-aliases/UserCredentials.md)\> + +Fetches the `username` and `password` combination for the given service. + +## Parameters + +• **serviceOrOptions?**: `string` \| [`GetOptions`](../type-aliases/GetOptions.md) + +A keychain options object or a service name string. + +## Returns + +`Promise`\<`false` \| [`UserCredentials`](../type-aliases/UserCredentials.md)\> + +Resolves to an object containing `service`, `username`, `password`, and `storage` when successful, or `false` on failure. + +## Example + +```typescript +const credentials = await Keychain.getGenericPassword(); +if (credentials) { + console.log('Credentials successfully loaded for user ' + credentials.username); +} else { + console.log('No credentials stored'); +} +``` + +## Defined in + +[index.ts:73](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L73) diff --git a/website/versioned_docs/version-9.1.0/api/functions/getInternetCredentials.md b/website/versioned_docs/version-9.1.0/api/functions/getInternetCredentials.md new file mode 100644 index 00000000..1bc8fee0 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/getInternetCredentials.md @@ -0,0 +1,36 @@ +# Function: getInternetCredentials() + +> **getInternetCredentials**(`server`, `options`?): `Promise`\<`false` \| [`UserCredentials`](../type-aliases/UserCredentials.md)\> + +Fetches the internet credentials for the given server. + +## Parameters + +• **server**: `string` + +The server URL. + +• **options?**: [`GetOptions`](../type-aliases/GetOptions.md) + +A keychain options object. + +## Returns + +`Promise`\<`false` \| [`UserCredentials`](../type-aliases/UserCredentials.md)\> + +Resolves to an object containing `server`, `username`, `password`, and `storage` when successful, or `false` on failure. + +## Example + +```typescript +const credentials = await Keychain.getInternetCredentials('https://example.com'); +if (credentials) { + console.log('Credentials loaded for user ' + credentials.username); +} else { + console.log('No credentials stored for server'); +} +``` + +## Defined in + +[index.ts:202](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L202) diff --git a/website/versioned_docs/version-9.1.0/api/functions/getSecurityLevel.md b/website/versioned_docs/version-9.1.0/api/functions/getSecurityLevel.md new file mode 100644 index 00000000..3ecb7686 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/getSecurityLevel.md @@ -0,0 +1,32 @@ +# Function: getSecurityLevel() + +> **getSecurityLevel**(`options`?): `Promise`\<`null` \| [`SECURITY_LEVEL`](../enumerations/SECURITY_LEVEL.md)\> + +Returns the security level supported by the library on the current device. + +## Parameters + +• **options?**: [`AccessControlOption`](../type-aliases/AccessControlOption.md) + +A keychain options object. + +## Returns + +`Promise`\<`null` \| [`SECURITY_LEVEL`](../enumerations/SECURITY_LEVEL.md)\> + +Resolves to a `SECURITY_LEVEL` when supported, otherwise `null`. + +## Platform + +Android + +## Example + +```typescript +const securityLevel = await Keychain.getSecurityLevel(); +console.log('Security Level:', securityLevel); +``` + +## Defined in + +[index.ts:356](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L356) diff --git a/website/versioned_docs/version-9.1.0/api/functions/getSupportedBiometryType.md b/website/versioned_docs/version-9.1.0/api/functions/getSupportedBiometryType.md new file mode 100644 index 00000000..52f79f63 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/getSupportedBiometryType.md @@ -0,0 +1,22 @@ +# Function: getSupportedBiometryType() + +> **getSupportedBiometryType**(): `Promise`\<`null` \| [`BIOMETRY_TYPE`](../enumerations/BIOMETRY_TYPE.md)\> + +Gets the type of biometric authentication supported by the device. + +## Returns + +`Promise`\<`null` \| [`BIOMETRY_TYPE`](../enumerations/BIOMETRY_TYPE.md)\> + +Resolves to a `BIOMETRY_TYPE` when supported, otherwise `null`. + +## Example + +```typescript +const biometryType = await Keychain.getSupportedBiometryType(); +console.log('Supported Biometry Type:', biometryType); +``` + +## Defined in + +[index.ts:243](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L243) diff --git a/website/versioned_docs/version-9.1.0/api/functions/hasGenericPassword.md b/website/versioned_docs/version-9.1.0/api/functions/hasGenericPassword.md new file mode 100644 index 00000000..6ba90c9e --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/hasGenericPassword.md @@ -0,0 +1,28 @@ +# Function: hasGenericPassword() + +> **hasGenericPassword**(`serviceOrOptions`?): `Promise`\<`boolean`\> + +Checks if generic password exists for the given service. + +## Parameters + +• **serviceOrOptions?**: `string` \| [`BaseOptions`](../type-aliases/BaseOptions.md) + +A keychain options object or a service name string. + +## Returns + +`Promise`\<`boolean`\> + +Resolves to `true` if a password exists, otherwise `false`. + +## Example + +```typescript +const hasPassword = await Keychain.hasGenericPassword(); +console.log('Password exists:', hasPassword); +``` + +## Defined in + +[index.ts:93](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L93) diff --git a/website/versioned_docs/version-9.1.0/api/functions/hasInternetCredentials.md b/website/versioned_docs/version-9.1.0/api/functions/hasInternetCredentials.md new file mode 100644 index 00000000..23cdac0e --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/hasInternetCredentials.md @@ -0,0 +1,28 @@ +# Function: hasInternetCredentials() + +> **hasInternetCredentials**(`serverOrOptions`): `Promise`\<`boolean`\> + +Checks if internet credentials exist for the given server. + +## Parameters + +• **serverOrOptions**: `string` \| [`BaseOptions`](../type-aliases/BaseOptions.md) + +A keychain options object or a server name string. + +## Returns + +`Promise`\<`boolean`\> + +Resolves to `true` if internet credentials exist, otherwise `false`. + +## Example + +```typescript +const hasCredentials = await Keychain.hasInternetCredentials('https://example.com'); +console.log('Internet credentials exist:', hasCredentials); +``` + +## Defined in + +[index.ts:148](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L148) diff --git a/website/versioned_docs/version-9.1.0/api/functions/requestSharedWebCredentials.md b/website/versioned_docs/version-9.1.0/api/functions/requestSharedWebCredentials.md new file mode 100644 index 00000000..c09d10e4 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/requestSharedWebCredentials.md @@ -0,0 +1,30 @@ +# Function: requestSharedWebCredentials() + +> **requestSharedWebCredentials**(): `Promise`\<`false` \| [`SharedWebCredentials`](../type-aliases/SharedWebCredentials.md)\> + +Request shared web credentials. + +## Returns + +`Promise`\<`false` \| [`SharedWebCredentials`](../type-aliases/SharedWebCredentials.md)\> + +Resolves to an object containing `server`, `username`, and `password` if approved, or `false` if denied. + +## Platform + +iOS + +## Example + +```typescript +const credentials = await Keychain.requestSharedWebCredentials(); +if (credentials) { + console.log('Shared credentials retrieved:', credentials); +} else { + console.log('No shared credentials available'); +} +``` + +## Defined in + +[index.ts:268](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L268) diff --git a/website/versioned_docs/version-9.1.0/api/functions/resetGenericPassword.md b/website/versioned_docs/version-9.1.0/api/functions/resetGenericPassword.md new file mode 100644 index 00000000..1d26f96e --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/resetGenericPassword.md @@ -0,0 +1,28 @@ +# Function: resetGenericPassword() + +> **resetGenericPassword**(`serviceOrOptions`?): `Promise`\<`boolean`\> + +Deletes all generic password keychain entries for the given service. + +## Parameters + +• **serviceOrOptions?**: `string` \| [`BaseOptions`](../type-aliases/BaseOptions.md) + +A keychain options object or a service name string. + +## Returns + +`Promise`\<`boolean`\> + +Resolves to `true` when successful, otherwise `false`. + +## Example + +```typescript +const success = await Keychain.resetGenericPassword(); +console.log('Password reset successful:', success); +``` + +## Defined in + +[index.ts:113](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L113) diff --git a/website/versioned_docs/version-9.1.0/api/functions/resetInternetCredentials.md b/website/versioned_docs/version-9.1.0/api/functions/resetInternetCredentials.md new file mode 100644 index 00000000..3c436f72 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/resetInternetCredentials.md @@ -0,0 +1,26 @@ +# Function: resetInternetCredentials() + +> **resetInternetCredentials**(`serverOrOptions`): `Promise`\<`void`\> + +Deletes all internet password keychain entries for the given server. + +## Parameters + +• **serverOrOptions**: `string` \| [`BaseOptions`](../type-aliases/BaseOptions.md) + +## Returns + +`Promise`\<`void`\> + +Resolves when the operation is completed. + +## Example + +```typescript +await Keychain.resetInternetCredentials('https://example.com'); +console.log('Credentials reset for server'); +``` + +## Defined in + +[index.ts:225](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L225) diff --git a/website/versioned_docs/version-9.1.0/api/functions/setGenericPassword.md b/website/versioned_docs/version-9.1.0/api/functions/setGenericPassword.md new file mode 100644 index 00000000..a30be82b --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/setGenericPassword.md @@ -0,0 +1,35 @@ +# Function: setGenericPassword() + +> **setGenericPassword**(`username`, `password`, `serviceOrOptions`?): `Promise`\<`false` \| [`Result`](../type-aliases/Result.md)\> + +Saves the `username` and `password` combination for the given service. + +## Parameters + +• **username**: `string` + +The username or e-mail to be saved. + +• **password**: `string` + +The password to be saved. + +• **serviceOrOptions?**: `string` \| [`SetOptions`](../type-aliases/SetOptions.md) + +A keychain options object or a service name string. Passing a service name as a string is deprecated. + +## Returns + +`Promise`\<`false` \| [`Result`](../type-aliases/Result.md)\> + +Resolves to an object containing `service` and `storage` when successful, or `false` on failure. + +## Example + +```typescript +await Keychain.setGenericPassword('username', 'password'); +``` + +## Defined in + +[index.ts:43](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L43) diff --git a/website/versioned_docs/version-9.1.0/api/functions/setInternetCredentials.md b/website/versioned_docs/version-9.1.0/api/functions/setInternetCredentials.md new file mode 100644 index 00000000..5e983a30 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/setInternetCredentials.md @@ -0,0 +1,39 @@ +# Function: setInternetCredentials() + +> **setInternetCredentials**(`server`, `username`, `password`, `options`?): `Promise`\<`false` \| [`Result`](../type-aliases/Result.md)\> + +Saves the internet credentials for the given server. + +## Parameters + +• **server**: `string` + +The server URL. + +• **username**: `string` + +The username or e-mail to be saved. + +• **password**: `string` + +The password to be saved. + +• **options?**: [`SetOptions`](../type-aliases/SetOptions.md) + +A keychain options object. + +## Returns + +`Promise`\<`false` \| [`Result`](../type-aliases/Result.md)\> + +Resolves to an object containing `service` and `storage` when successful, or `false` on failure. + +## Example + +```typescript +await Keychain.setInternetCredentials('https://example.com', 'username', 'password'); +``` + +## Defined in + +[index.ts:170](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L170) diff --git a/website/versioned_docs/version-9.1.0/api/functions/setSharedWebCredentials.md b/website/versioned_docs/version-9.1.0/api/functions/setSharedWebCredentials.md new file mode 100644 index 00000000..07716d8d --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/functions/setSharedWebCredentials.md @@ -0,0 +1,40 @@ +# Function: setSharedWebCredentials() + +> **setSharedWebCredentials**(`server`, `username`, `password`?): `Promise`\<`void`\> + +Sets shared web credentials. + +## Parameters + +• **server**: `string` + +The server URL. + +• **username**: `string` + +The username or e-mail to be saved. + +• **password?**: `string` + +The password to be saved. + +## Returns + +`Promise`\<`void`\> + +Resolves when the operation is completed. + +## Platform + +iOS + +## Example + +```typescript +await Keychain.setSharedWebCredentials('https://example.com', 'username', 'password'); +console.log('Shared web credentials set'); +``` + +## Defined in + +[index.ts:298](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/index.ts#L298) diff --git a/website/versioned_docs/version-9.1.0/api/index.md b/website/versioned_docs/version-9.1.0/api/index.md new file mode 100644 index 00000000..5ee11670 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/index.md @@ -0,0 +1,40 @@ +# API + +## Functions + +- [canImplyAuthentication](functions/canImplyAuthentication.md) +- [getAllGenericPasswordServices](functions/getAllGenericPasswordServices.md) +- [getGenericPassword](functions/getGenericPassword.md) +- [getInternetCredentials](functions/getInternetCredentials.md) +- [getSecurityLevel](functions/getSecurityLevel.md) +- [getSupportedBiometryType](functions/getSupportedBiometryType.md) +- [hasGenericPassword](functions/hasGenericPassword.md) +- [hasInternetCredentials](functions/hasInternetCredentials.md) +- [requestSharedWebCredentials](functions/requestSharedWebCredentials.md) +- [resetGenericPassword](functions/resetGenericPassword.md) +- [resetInternetCredentials](functions/resetInternetCredentials.md) +- [setGenericPassword](functions/setGenericPassword.md) +- [setInternetCredentials](functions/setInternetCredentials.md) +- [setSharedWebCredentials](functions/setSharedWebCredentials.md) + +## Enumerations + +- [ACCESS\_CONTROL](enumerations/ACCESS_CONTROL.md) +- [ACCESSIBLE](enumerations/ACCESSIBLE.md) +- [AUTHENTICATION\_TYPE](enumerations/AUTHENTICATION_TYPE.md) +- [BIOMETRY\_TYPE](enumerations/BIOMETRY_TYPE.md) +- [SECURITY\_LEVEL](enumerations/SECURITY_LEVEL.md) +- [SECURITY\_RULES](enumerations/SECURITY_RULES.md) +- [STORAGE\_TYPE](enumerations/STORAGE_TYPE.md) + +## Type Aliases + +- [AccessControlOption](type-aliases/AccessControlOption.md) +- [AuthenticationPrompt](type-aliases/AuthenticationPrompt.md) +- [AuthenticationTypeOption](type-aliases/AuthenticationTypeOption.md) +- [BaseOptions](type-aliases/BaseOptions.md) +- [GetOptions](type-aliases/GetOptions.md) +- [Result](type-aliases/Result.md) +- [SetOptions](type-aliases/SetOptions.md) +- [SharedWebCredentials](type-aliases/SharedWebCredentials.md) +- [UserCredentials](type-aliases/UserCredentials.md) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/AccessControlOption.md b/website/versioned_docs/version-9.1.0/api/type-aliases/AccessControlOption.md new file mode 100644 index 00000000..476768c6 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/AccessControlOption.md @@ -0,0 +1,15 @@ +# Type Alias: AccessControlOption + +> **AccessControlOption**: `object` + +## Type declaration + +### accessControl? + +> `optional` **accessControl**: [`ACCESS_CONTROL`](../enumerations/ACCESS_CONTROL.md) + +The access control policy to use for the keychain item. + +## Defined in + +[types.ts:89](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L89) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationPrompt.md b/website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationPrompt.md new file mode 100644 index 00000000..ba99cffa --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationPrompt.md @@ -0,0 +1,47 @@ +# Type Alias: AuthenticationPrompt + +> **AuthenticationPrompt**: `object` + +Options for authentication prompt displayed to the user. + +## Type declaration + +### cancel? + +> `optional` **cancel**: `string` + +The cancel button text for the authentication prompt. + +#### Platform + +Android + +### description? + +> `optional` **description**: `string` + +The description for the authentication prompt. + +#### Platform + +Android + +### subtitle? + +> `optional` **subtitle**: `string` + +The subtitle for the authentication prompt. + +#### Platform + +Android + +### title? + +> `optional` **title**: `string` + +The title for the authentication prompt. + +## Defined in + +[types.ts:13](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L13) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationTypeOption.md b/website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationTypeOption.md new file mode 100644 index 00000000..b5b04704 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/AuthenticationTypeOption.md @@ -0,0 +1,25 @@ +# Type Alias: AuthenticationTypeOption + +> **AuthenticationTypeOption**: `object` + +## Type declaration + +### authenticationType? + +> `optional` **authenticationType**: [`AUTHENTICATION_TYPE`](../enumerations/AUTHENTICATION_TYPE.md) + +Authentication type for retrieving keychain item. + +#### Platform + +iOS, visionOS + +#### Default + +```ts +AUTHENTICATION_TYPE.DEVICE_PASSCODE_OR_BIOMETRICS +``` + +## Defined in + +[types.ts:94](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L94) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/BaseOptions.md b/website/versioned_docs/version-9.1.0/api/type-aliases/BaseOptions.md new file mode 100644 index 00000000..c169a6b5 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/BaseOptions.md @@ -0,0 +1,37 @@ +# Type Alias: BaseOptions + +> **BaseOptions**: `object` + +## Type declaration + +### cloudSync? + +> `optional` **cloudSync**: `boolean` + +Whether to synchronize the keychain item to iCloud. + +#### Platform + +iOS + +### server? + +> `optional` **server**: `string` + +The server name to associate with the keychain item. + +### service? + +> `optional` **service**: `string` + +The service name to associate with the keychain item. + +#### Default + +```ts +'App bundle ID' +``` + +## Defined in + +[types.ts:30](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L30) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/GetOptions.md b/website/versioned_docs/version-9.1.0/api/type-aliases/GetOptions.md new file mode 100644 index 00000000..5497a94e --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/GetOptions.md @@ -0,0 +1,48 @@ +# Type Alias: GetOptions + +> **GetOptions**: `object` & [`BaseOptions`](BaseOptions.md) & [`AccessControlOption`](AccessControlOption.md) + +Base options for keychain functions. + +## Type declaration + +### accessControl? + +> `optional` **accessControl**: [`ACCESS_CONTROL`](../enumerations/ACCESS_CONTROL.md) + +The access control policy to use for the keychain item. + +### authenticationPrompt? + +> `optional` **authenticationPrompt**: `string` \| [`AuthenticationPrompt`](AuthenticationPrompt.md) + +Authentication prompt details or a title string. + +#### Default + +```json +{ + "title": "Authenticate to retrieve secret", + "cancel": "Cancel" +} +``` + +### rules? + +> `optional` **rules**: [`SECURITY_RULES`](../enumerations/SECURITY_RULES.md) + +The security rules to apply when storing the keychain item. + +#### Platform + +Android + +#### Default + +```ts +SECURITY_RULES.AUTOMATIC_UPGRADE +``` + +## Defined in + +[types.ts:67](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L67) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/Result.md b/website/versioned_docs/version-9.1.0/api/type-aliases/Result.md new file mode 100644 index 00000000..327c14eb --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/Result.md @@ -0,0 +1,23 @@ +# Type Alias: Result + +> **Result**: `object` + +Result returned by keychain functions. + +## Type declaration + +### service + +> **service**: `string` + +The service name associated with the keychain item. + +### storage + +> **storage**: [`STORAGE_TYPE`](../enumerations/STORAGE_TYPE.md) + +The storage type used for the keychain item. + +## Defined in + +[types.ts:105](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L105) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/SetOptions.md b/website/versioned_docs/version-9.1.0/api/type-aliases/SetOptions.md new file mode 100644 index 00000000..f706a57d --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/SetOptions.md @@ -0,0 +1,63 @@ +# Type Alias: SetOptions + +> **SetOptions**: `object` & [`BaseOptions`](BaseOptions.md) & [`AccessControlOption`](AccessControlOption.md) + +Base options for keychain functions. + +## Type declaration + +### accessGroup? + +> `optional` **accessGroup**: `string` + +The access group to share keychain items between apps. + +#### Platform + +iOS, visionOS + +### accessible? + +> `optional` **accessible**: [`ACCESSIBLE`](../enumerations/ACCESSIBLE.md) + +Specifies when a keychain item is accessible. + +#### Platform + +iOS, visionOS + +#### Default + +```ts +ACCESSIBLE.AFTER_FIRST_UNLOCK +``` + +### securityLevel? + +> `optional` **securityLevel**: [`SECURITY_LEVEL`](../enumerations/SECURITY_LEVEL.md) + +The desired security level of the keychain item. + +#### Platform + +Android + +### storage? + +> `optional` **storage**: [`STORAGE_TYPE`](../enumerations/STORAGE_TYPE.md) + +The storage type. + +#### Platform + +Android + +#### Default + +```ts +'Best available storage' +``` + +## Defined in + +[types.ts:44](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L44) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/SharedWebCredentials.md b/website/versioned_docs/version-9.1.0/api/type-aliases/SharedWebCredentials.md new file mode 100644 index 00000000..48759f87 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/SharedWebCredentials.md @@ -0,0 +1,21 @@ +# Type Alias: SharedWebCredentials + +> **SharedWebCredentials**: `object` & [`UserCredentials`](UserCredentials.md) + +Shared web credentials returned by keychain functions. + +## Type declaration + +### server + +> **server**: `string` + +The server associated with the keychain item. + +## Platform + +iOS + +## Defined in + +[types.ts:126](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L126) diff --git a/website/versioned_docs/version-9.1.0/api/type-aliases/UserCredentials.md b/website/versioned_docs/version-9.1.0/api/type-aliases/UserCredentials.md new file mode 100644 index 00000000..b8044293 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/api/type-aliases/UserCredentials.md @@ -0,0 +1,23 @@ +# Type Alias: UserCredentials + +> **UserCredentials**: `object` & [`Result`](Result.md) + +User credentials returned by keychain functions. + +## Type declaration + +### password + +> **password**: `string` + +The password associated with the keychain item. + +### username + +> **username**: `string` + +The username associated with the keychain item. + +## Defined in + +[types.ts:115](https://github.com/oblador/react-native-keychain/blob/7eaf30e4858d9a03afd4c8e017b83a96fbc4e982/src/types.ts#L115) diff --git a/website/versioned_docs/version-9.1.0/faq.md b/website/versioned_docs/version-9.1.0/faq.md new file mode 100644 index 00000000..51d2a0b3 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/faq.md @@ -0,0 +1,46 @@ +--- +id: faq +title: Frequently Asked Questions +--- + +**Q: How does the library handle encryption when storing secrets, and can it upgrade the encryption?** + +**A:** The library automatically applies the highest possible encryption when storing secrets. However, once a secret is stored, it does not attempt to upgrade the encryption unless **Facebook Conceal** was used and the `SECURITY_RULES` option is set to `AUTOMATIC_UPGRADE`. + +--- + +**Q: What happens if the user disables or drops biometric usage?** + +**A:** The user will lose the ability to retrieve the secret from storage. If biometric access is re-enabled, access to the secret will be restored. + +--- + +**Q: Is it possible to implement automatic downgrading?** + +**A:** From a security perspective, automatic downgrading is considered a "loss of trust." Developers should implement their own logic to allow downgrades and handle the "security loss" accordingly. + +> **Recommendation:** Avoid implementing automatic downgrades. + +--- + +**Q: How do I enable automatic upgrades for Facebook Conceal?** + +**A:** Use the following call: + +```tsx +getGenericPassword({ ...otherProps, rules: "AUTOMATIC_UPGRADE" }); +``` + +Ensure the `rules` property is set to the string value `AUTOMATIC_UPGRADE`. + +--- + +**Q: How do I force a specific level of encryption when saving a secret?** + +**A:** To force a specific encryption level, call: + +```tsx +setGenericPassword({ ...otherProps, storage: "AES" }); +``` + +> **Note:** If you attempt to force `RSA` storage when biometrics are not available, the call will be rejected with an error related to the device's biometric configuration. \ No newline at end of file diff --git a/website/versioned_docs/version-9.1.0/index.md b/website/versioned_docs/version-9.1.0/index.md new file mode 100644 index 00000000..06b49608 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/index.md @@ -0,0 +1,53 @@ +--- +id: index +title: react-native-keychain +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## Overview + +**react-native-keychain** is a library that provides keychain/keystore access for React Native applications. It allows you to securely store and retrieve sensitive information such as passwords, internet credentials, and tokens using native encryption mechanisms provided by iOS and Android. + +This library supports various security features such as biometric authentication (Face ID, Touch ID, Fingerprint), secure storage levels, as well as customizable options for accessing and storing data. + +## Support + +This library supports both iOS and Android platforms. Additionally, it has support for macOS Catalyst and visionOS. +For iOS, the library uses the Keychain Services API, while on Android, it uses Facebook Conceal or the Android Keystore depending on the API level. + +Supported platforms and versions: + +- **iOS**: Requires iOS 9.0+ +- **Android**: API 16+ (uses Facebook Conceal for API levels 16-22, Android Keystore for API 23+) +- **macOS Catalyst**: Supported +- **visionOS**: Supported + +## Installation + +**react-native-keychain** is on the npm registry! Install it using your favorite Node.js package manager: + + + + +```bash +npm install react-native-keychain +``` + + + + +```bash +yarn add react-native-keychain +``` + + + + +```bash +pnpm add react-native-keychain +``` + + + \ No newline at end of file diff --git a/website/versioned_docs/version-9.1.0/jest.md b/website/versioned_docs/version-9.1.0/jest.md new file mode 100644 index 00000000..e2d814c3 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/jest.md @@ -0,0 +1,176 @@ +--- +id: jest +title: Unit Testing with Jest +--- + +The keychain manager relies on interfacing with the native application itself. As such, it does not successfully compile and run in the context of a Jest test, where there is no underlying app to communicate with. To be able to call the JavaScript (or TypeScript) functions exposed by this module in a unit test, you must mock them. This guide provides two approaches for mocking the module. + +## Mocking the Keychain Module in Jest + +First, let's create a mock object for the module. This mock should reflect the structure of the actual module that you are testing. Based on the TypeScript file, your mock should include the various enums and functions that are used by the keychain module. + +```ts +// keychainMock.ts or keychainMock.js + +const keychainMock = { + SECURITY_LEVEL: { + SECURE_SOFTWARE: 'MOCK_SECURITY_LEVEL_SECURE_SOFTWARE', + SECURE_HARDWARE: 'MOCK_SECURITY_LEVEL_SECURE_HARDWARE', + ANY: 'MOCK_SECURITY_LEVEL_ANY', + }, + ACCESSIBLE: { + WHEN_UNLOCKED: 'MOCK_AccessibleWhenUnlocked', + AFTER_FIRST_UNLOCK: 'MOCK_AccessibleAfterFirstUnlock', + ALWAYS: 'MOCK_AccessibleAlways', + WHEN_PASSCODE_SET_THIS_DEVICE_ONLY: 'MOCK_AccessibleWhenPasscodeSetThisDeviceOnly', + WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'MOCK_AccessibleWhenUnlockedThisDeviceOnly', + AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY: 'MOCK_AccessibleAfterFirstUnlockThisDeviceOnly', + }, + ACCESS_CONTROL: { + USER_PRESENCE: 'MOCK_UserPresence', + BIOMETRY_ANY: 'MOCK_BiometryAny', + BIOMETRY_CURRENT_SET: 'MOCK_BiometryCurrentSet', + DEVICE_PASSCODE: 'MOCK_DevicePasscode', + APPLICATION_PASSWORD: 'MOCK_ApplicationPassword', + BIOMETRY_ANY_OR_DEVICE_PASSCODE: 'MOCK_BiometryAnyOrDevicePasscode', + BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE: 'MOCK_BiometryCurrentSetOrDevicePasscode', + }, + AUTHENTICATION_TYPE: { + DEVICE_PASSCODE_OR_BIOMETRICS: 'MOCK_AuthenticationWithBiometricsDevicePasscode', + BIOMETRICS: 'MOCK_AuthenticationWithBiometrics', + }, + STORAGE_TYPE: { + FB: 'MOCK_FacebookConceal', + AES: 'MOCK_KeystoreAESCBC', + RSA: 'MOCK_KeystoreRSAECB', + KC: 'MOCK_keychain', + }, + setGenericPassword: jest.fn().mockResolvedValue({ + service: 'mockService', + storage: 'mockStorage', + }), + getGenericPassword: jest.fn().mockResolvedValue({ + username: 'mockUser', + password: 'mockPassword', + service: 'mockService', + storage: 'mockStorage', + }), + resetGenericPassword: jest.fn().mockResolvedValue(true), + hasGenericPassword: jest.fn().mockResolvedValue(true), + getAllGenericPasswordServices: jest + .fn() + .mockResolvedValue(['mockService1', 'mockService2']), + setInternetCredentials: jest.fn().mockResolvedValue({ + service: 'mockService', + storage: 'mockStorage', + }), + getInternetCredentials: jest.fn().mockResolvedValue({ + username: 'mockUser', + password: 'mockPassword', + service: 'mockService', + storage: 'mockStorage', + }), + resetInternetCredentials: jest.fn().mockResolvedValue(), + getSupportedBiometryType: jest.fn().mockResolvedValue('MOCK_TouchID'), + canImplyAuthentication: jest.fn().mockResolvedValue(true), + getSecurityLevel: jest.fn().mockResolvedValue('MOCK_SECURE_SOFTWARE'), +}; + +export default keychainMock; +``` + +## Using a Jest `__mocks__` Directory + +1. Read the [Jest documentation](https://jestjs.io/docs/en/manual-mocks#mocking-node-modules) for initial setup. + +2. Create a `__mocks__` directory in your project root. + +3. Inside the `__mocks__` directory, create a `react-native-keychain` folder. + +4. In the `react-native-keychain` folder, create an `index.js` (or `index.ts` if using TypeScript) file with the following content: + +```ts +// index.ts or index.js inside __mocks__/react-native-keychain + +const keychainMock = { + SECURITY_LEVEL: { + SECURE_SOFTWARE: 'MOCK_SECURITY_LEVEL_SECURE_SOFTWARE', + SECURE_HARDWARE: 'MOCK_SECURITY_LEVEL_SECURE_HARDWARE', + ANY: 'MOCK_SECURITY_LEVEL_ANY', + }, + // ... rest of the keychainMock object ... + // (Copy the entire keychainMock object from above) +}; + +module.exports = keychainMock; +``` + +This approach allows you to mock the entire `react-native-keychain` module for all your tests. + +## Using a Jest Setup File + +1. In your Jest configuration file (`jest.config.js`), add a reference to a [setup file](https://jestjs.io/docs/en/configuration#setupfiles-array): + +```js +module.exports = { + // ... other configurations ... + setupFiles: ['/jest.setup.js'], +}; +``` + +2. Inside your `jest.setup.js` file, set up mocking for this package: + +```ts +// jest.setup.js + +import keychainMock from './path/to/keychainMock'; + +jest.mock('react-native-keychain', () => keychainMock); +``` + +Ensure that the path to `keychainMock` is correct relative to your `jest.setup.js` file. + +Now your tests should run successfully. Writing and reading to the keychain will be effectively a no-op because the actual native code is not being called. Instead, the mock functions will return the mocked values you specified. + +## Example Test + +Here is an example of how you could write a unit test for a function that uses the `react-native-keychain` module: + +```ts +import Keychain from 'react-native-keychain'; + +describe('Keychain Manager', () => { + it('should save and retrieve credentials', async () => { + // Mock saving credentials + await Keychain.setGenericPassword('testUser', 'testPassword'); + expect(Keychain.setGenericPassword).toHaveBeenCalledWith( + 'testUser', + 'testPassword' + ); + + // Mock retrieving credentials + const credentials = await Keychain.getGenericPassword(); + expect(credentials).toEqual({ + username: 'mockUser', + password: 'mockPassword', + service: 'mockService', + storage: 'mockStorage', + }); + }); + + it('should check if a password exists', async () => { + const exists = await Keychain.hasGenericPassword(); + expect(exists).toBe(true); + }); + + it('should reset credentials', async () => { + const reset = await Keychain.resetGenericPassword(); + expect(reset).toBe(true); + }); + + it('should get supported biometry type', async () => { + const biometryType = await Keychain.getSupportedBiometryType(); + expect(biometryType).toBe('MOCK_TouchID'); + }); +}); +``` \ No newline at end of file diff --git a/website/versioned_docs/version-9.1.0/usage.md b/website/versioned_docs/version-9.1.0/usage.md new file mode 100644 index 00000000..25f5dd38 --- /dev/null +++ b/website/versioned_docs/version-9.1.0/usage.md @@ -0,0 +1,110 @@ +--- +id: usage +title: Usage +--- + +## Basic Usage + +To use `react-native-keychain`, follow the example below to securely store and retrieve credentials. + +```tsx +import * as Keychain from 'react-native-keychain'; + +async () => { + const username = 'zuck'; + const password = 'poniesRgr8'; + + // Store the credentials + await Keychain.setGenericPassword(username, password); + + try { + // Retrieve the credentials + const credentials = await Keychain.getGenericPassword(); + if (credentials) { + console.log( + 'Credentials successfully loaded for user ' + credentials.username + ); + } else { + console.log('No credentials stored'); + } + } catch (error) { + console.error("Failed to access Keychain", error); + } + + // Reset the stored credentials + await Keychain.resetGenericPassword(); +}; +``` + +See the `KeychainExample` for a fully working project example. + +> **Note**: Both `setGenericPassword` and `setInternetCredentials` only support strings. If you need to store objects, use `JSON.stringify` when storing and `JSON.parse` when retrieving. + +## Advanced Usage + +### Android + +The module automatically selects the appropriate `CipherStorage` implementation based on the device's API level: + +- **API levels 16-22**: Uses Facebook Conceal for encryption/decryption. +- **API level 23+**: Uses Android Keystore for encryption/decryption. + +Encrypted data is stored in `SharedPreferences`. + +#### Multiple Credentials + +When using `setInternetCredentials(server, username, password)`, the `server` argument is treated as a key to distinguish between multiple entries. Internally, this is equivalent to calling `setGenericPassword(username, password, server)`. + +### Configuring Android-Specific Behavior + +Due to inconsistencies in Android implementations across different manufacturers, some devices (e.g., Samsung) may experience slow startup times for the cryptographic system. To address this, the Android implementation includes a "warm-up" strategy by default. + +#### Default Warm-Up Behavior + +By default, the warm-up strategy is enabled, as shown below: + +```java +private List createPackageList() { + return Arrays.asList( + ... + new KeychainPackage(), // warming up is ON by default + ... + ); +} +``` + +#### Disabling Warm-Up + +If you need more control over the behavior, you can disable warm-up by using the builder pattern: + +```java +private List createPackageList() { + return Arrays.asList( + ... + new KeychainPackage( + new KeychainModuleBuilder() + .withoutWarmUp() // warming up is OFF + ), + ... + ); +} +``` + +### iOS + +To share the Keychain between your main app and a Share Extension in iOS, ensure the following: + +1. Use the same App Group and Keychain Sharing group names in both your Main App and Share Extension. +2. Utilize the `accessGroup` and `service` options when calling `setGenericPassword` and `getGenericPassword`: + +```tsx +Keychain.getGenericPassword({ + accessGroup: 'group.appname', + service: 'com.example.appname' +}); +``` + +## References + +- [Apple Local Authentication Documentation](https://developer.apple.com/documentation/localauthentication) +- [Apple Security Documentation](https://developer.apple.com/documentation/security) \ No newline at end of file diff --git a/website/versioned_sidebars/version-9.1.0-sidebars.json b/website/versioned_sidebars/version-9.1.0-sidebars.json new file mode 100644 index 00000000..d733fc65 --- /dev/null +++ b/website/versioned_sidebars/version-9.1.0-sidebars.json @@ -0,0 +1,193 @@ +{ + "docs": [ + { + "type": "doc", + "id": "index", + "label": "Introduction" + }, + { + "type": "doc", + "id": "usage", + "label": "Usage" + }, + { + "type": "doc", + "id": "jest", + "label": "Unit Testing with Jest" + }, + { + "type": "doc", + "id": "faq", + "label": "Frequently Asked Questions" + } + ], + "api": [ + "api/index", + [ + { + "type": "category", + "label": "Functions", + "items": [ + { + "type": "doc", + "id": "api/functions/canImplyAuthentication", + "label": "canImplyAuthentication" + }, + { + "type": "doc", + "id": "api/functions/getAllGenericPasswordServices", + "label": "getAllGenericPasswordServices" + }, + { + "type": "doc", + "id": "api/functions/getGenericPassword", + "label": "getGenericPassword" + }, + { + "type": "doc", + "id": "api/functions/getInternetCredentials", + "label": "getInternetCredentials" + }, + { + "type": "doc", + "id": "api/functions/getSecurityLevel", + "label": "getSecurityLevel" + }, + { + "type": "doc", + "id": "api/functions/getSupportedBiometryType", + "label": "getSupportedBiometryType" + }, + { + "type": "doc", + "id": "api/functions/hasGenericPassword", + "label": "hasGenericPassword" + }, + { + "type": "doc", + "id": "api/functions/hasInternetCredentials", + "label": "hasInternetCredentials" + }, + { + "type": "doc", + "id": "api/functions/requestSharedWebCredentials", + "label": "requestSharedWebCredentials" + }, + { + "type": "doc", + "id": "api/functions/resetGenericPassword", + "label": "resetGenericPassword" + }, + { + "type": "doc", + "id": "api/functions/resetInternetCredentials", + "label": "resetInternetCredentials" + }, + { + "type": "doc", + "id": "api/functions/setGenericPassword", + "label": "setGenericPassword" + }, + { + "type": "doc", + "id": "api/functions/setInternetCredentials", + "label": "setInternetCredentials" + }, + { + "type": "doc", + "id": "api/functions/setSharedWebCredentials", + "label": "setSharedWebCredentials" + } + ] + }, + { + "type": "category", + "label": "Enumerations", + "items": [ + { + "type": "doc", + "id": "api/enumerations/ACCESS_CONTROL", + "label": "ACCESS_CONTROL" + }, + { + "type": "doc", + "id": "api/enumerations/ACCESSIBLE", + "label": "ACCESSIBLE" + }, + { + "type": "doc", + "id": "api/enumerations/AUTHENTICATION_TYPE", + "label": "AUTHENTICATION_TYPE" + }, + { + "type": "doc", + "id": "api/enumerations/BIOMETRY_TYPE", + "label": "BIOMETRY_TYPE" + }, + { + "type": "doc", + "id": "api/enumerations/SECURITY_LEVEL", + "label": "SECURITY_LEVEL" + }, + { + "type": "doc", + "id": "api/enumerations/SECURITY_RULES", + "label": "SECURITY_RULES" + }, + { + "type": "doc", + "id": "api/enumerations/STORAGE_TYPE", + "label": "STORAGE_TYPE" + } + ] + }, + { + "type": "category", + "label": "Type Aliases", + "items": [ + { + "type": "doc", + "id": "api/type-aliases/AccessControlOption", + "label": "AccessControlOption" + }, + { + "type": "doc", + "id": "api/type-aliases/AuthenticationPrompt", + "label": "AuthenticationPrompt" + }, + { + "type": "doc", + "id": "api/type-aliases/AuthenticationTypeOption", + "label": "AuthenticationTypeOption" + }, + { + "type": "doc", + "id": "api/type-aliases/BaseOptions", + "label": "BaseOptions" + }, + { + "type": "doc", + "id": "api/type-aliases/GetOptions", + "label": "GetOptions" + }, + { "type": "doc", "id": "api/type-aliases/Result", "label": "Result" }, + { + "type": "doc", + "id": "api/type-aliases/SetOptions", + "label": "SetOptions" + }, + { + "type": "doc", + "id": "api/type-aliases/SharedWebCredentials", + "label": "SharedWebCredentials" + }, + { + "type": "doc", + "id": "api/type-aliases/UserCredentials", + "label": "UserCredentials" + } + ] + } + ] + ] +}