[android] Remove unnecessary version checks (#24203)# Why This PR is related to #24201, it removes unnecessary version checks # How Remove version check logic for SDK's < 23 # Test Pla
[android] Remove unnecessary version checks (#24203)# Why This PR is related to #24201, it removes unnecessary version checks # How Remove version check logic for SDK's < 23 # Test Plan Tested in Bare Expo in Android 13 simulator
show more ...
[secure-store][android] Secure store audit (#23804)# Why ENG-6327 Secure-store was using the old modules API. We wanted to add synchronous functions to the API, so it's possible to use SecureSto
[secure-store][android] Secure store audit (#23804)# Why ENG-6327 Secure-store was using the old modules API. We wanted to add synchronous functions to the API, so it's possible to use SecureStore in the global JS scope. During the migration I've also found some bugs/unexpected behaviours which were corrected # How - Migrated `secure-store` to Kotlin and the new modules API - Changed callback-based authentication prompt to Kotlin coroutines - Added `getItemSync` and `setItemSync` functions - Both functions call the same functions as Async versions, but on the main thread - It is now possible to save values which require authentication and ones that don't under one keychain on the JS side. This is archived by creating two separate keys on the native side. - Before it wasn't possible to save a no-authentication value under a keychain, which was initialised with a require-auth value (an exception was thrown). It was possible to save a value which requires authentication into a keychain which was already initialised as no-auth, but it wasn't really encrypted with the necessity of auth and could've been decrypted without authentication (although `secure-store` always asked for biometrics correctly) - It is now possible to save values under different keychains but the same key. `Secure-store` can now differentiate between them. Before saving `value1` under `key1` and `keychain1` and `value2` under `key1` and `keychain2` would overwrite the `value1` under `key1` with a new value. Now they are separate. This archived by saving the items in shared preferences under a key which includes the keychain eq. `keychain1-key1` and `keychain2-key1`. This emulates the `ios` `secure-store` behavior - Backwards compatibility with the current naming scheme of keystore aliases has been kept - Improved invalidated key exception handling. When removing a key from the key store all values under that key will be removed from shared preferences in order to avoid exceptions caused by decryption fails. This doesn't apply to values stored with previous versions of `expo-secure-store` as it is not possible to determine if value was stored with a keychain without making an decryption attempt. - Updated the docs - Removed SDK20 read support # Test Plan Tested in Bare Expo and Expo Go on a physical android 13 and 7 devices (forced api < 23 functions on android 7 only for testing since we don't have such an old device) --------- Co-authored-by: Expo Bot <[email protected]>
[expo-secure-store][android] Added automatic invalidated key exception handling (#22716)# Why Users reported that invalidated keys aren't handled properly on Android https://github.com/expo/exp
[expo-secure-store][android] Added automatic invalidated key exception handling (#22716)# Why Users reported that invalidated keys aren't handled properly on Android https://github.com/expo/expo/issues/22312. # How Added automatic exception handling when user writes to a key which has been invalidated. I was adding a new exception, so I rewritten the rest of them in kotlin (will be helpful when porting the module to the new API) Updated docs to inform users about how the invalidated keys are handled. # Test Plan Tested on a physical Android 12 device.
[secure-store] Add option enabling user authentication while accessing SecureStore (#14512)
[expo-modules] Move code from `unimodules` into `expo-modules-core` (#13703)# Why Migrated `unimodules-core`, `unimodules-react-native-adapter`, `unimodules-app-loader` into `expo-modules-core`
[expo-modules] Move code from `unimodules` into `expo-modules-core` (#13703)# Why Migrated `unimodules-core`, `unimodules-react-native-adapter`, `unimodules-app-loader` into `expo-modules-core` # How - Change package using AS refactor tools - Fix some places where AS wasn't able to do automatically - Fix compatibility with new auto-linking - Ensure that classes which are used during installation steps are still available in the old place # Test Plan - expo-go (tested using unversioned and 41) - bare-expo
[secure-store] prevent losing data after ejecting (#11309)* create ScopedSecureStore on Android * bring in ScopedSecureStore class in standalones and client * [ios] no longer scope key values
[secure-store] prevent losing data after ejecting (#11309)* create ScopedSecureStore on Android * bring in ScopedSecureStore class in standalones and client * [ios] no longer scope key values in standalones * [android] only pass baseContext in standalone environment * Apply suggestions from code review Co-authored-by: Bartłomiej Bukowski <[email protected]> * add changelog entry * fix SDK version numbers * use constantsBinding.appOwnership instead of EX_DETACHED Co-authored-by: Bartłomiej Bukowski <[email protected]>
[android] update base64 decoding options (#7841)* [android] [camera] use .NO_WRAP to encode base64 output * [android] [image-manipulator] use .NO_WRAP to encode base64 output * [android] [ima
[android] update base64 decoding options (#7841)* [android] [camera] use .NO_WRAP to encode base64 output * [android] [image-manipulator] use .NO_WRAP to encode base64 output * [android] [image-picker] use .NO_WRAP to encode base64 output * [android] [print] use .NO_WRAP to encode base64 output * [android] [secure-store] use .NO_WRAP to encode base64 output Co-authored-by: Bartłomiej Bukowski <[email protected]> Co-authored-by: Łukasz Kosmaty <[email protected]>
[android] Remove SpongyCastle (#6464)# Why May fix https://github.com/expo/expo/issues/5688. # How From what I understood from the code (SpongyCastle integration was in the Android codebas
[android] Remove SpongyCastle (#6464)# Why May fix https://github.com/expo/expo/issues/5688. # How From what I understood from the code (SpongyCastle integration was in the Android codebase from day one, so no PR description for me): - we verify whether the app that is being served actually is served by an authenticated Expo user (`expo-cli` sends an authenticated request to Expo servers to sign the manifest under given username with a private key) - X.509 is used as the format of the key - since not every Android platform provides a `KeyFactory` for `X.509` keys, SpongyCastle was added to ensure X.509 factory works on every device What I found: - no online resource uses `X.509` as an argument to `KeyFactory.getInstance`. - `X.509` was supported only in Android APIs 1-8 ([source](https://developer.android.com/guide/topics/security/cryptography#SupportedKeyFactory)) - `RSA` is supported in Android API 1+ ([source](https://developer.android.com/guide/topics/security/cryptography#SupportedKeyFactory)) - if we substitute `X.509` with `RSA` in the `KeyFactory.getInstance`, the signature is still validated - if we substitute `X.509` with `DSA`, the signature validation fails - after these changes our code looks just like `verify` method from `godlibrary`: https://github.com/abook23/godlibrary/blob/master/src/main/java/com/god/util/RSAUtlis.java#L227-L243 # Test Plan Running experiences works. `SecureStore` NCL screen still works as expected. Values saved in `SecureStore` are persisted between `master` and this branch.
[packages] Move unimodules foundation to `org.unimodules` scope
[expo-secure-store] Extract SecureStore API from Expo to a universal module (#3316)# Why Universalmodulling Expo. # How Nothing special apart from having to override `SecureStoreModule` in
[expo-secure-store] Extract SecureStore API from Expo to a universal module (#3316)# Why Universalmodulling Expo. # How Nothing special apart from having to override `SecureStoreModule` in `expoview` to be able to remove `BouncyCastleProvider` if it's present. # Test Plan SecureStore screen in NCL works ok.