Skip to content

Commit

Permalink
feat(INJI-555): fix ios data loss and crash after vc activation (#1083)
Browse files Browse the repository at this point in the history
Signed-off-by: Pooja Babusingh <[email protected]>
Co-authored-by: Pooja Babusingh <[email protected]>
Co-authored-by: Swati Goel <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2023
1 parent 7151cdc commit 25311ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ fileignoreconfig:
checksum: a99fe136d9d1348c541d413324d266e179ecad6a1fe6b6bd1e0b2856a5a6d6b5
- filename: screens/QrLogin/QrConsent.tsx
checksum: 8563a194a4d38814eff670f0652d1a7af77134cafb350462174b4f147dbd890d
- filename: machines/store.ts
checksum: ca2328c39d2757ffebf85c0b6663da1073eb58349f2630c9418b2f16c350cbd1
6 changes: 5 additions & 1 deletion machines/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import {createModel} from 'xstate/lib/model';
import {generateSecureRandom} from 'react-native-securerandom';
import {log} from 'xstate/lib/actions';
import {MY_VCS_STORE_KEY, SETTINGS_STORE_KEY} from '../shared/constants';
import {isIOS, MY_VCS_STORE_KEY, SETTINGS_STORE_KEY} from '../shared/constants';
import SecureKeystore from 'react-native-secure-keystore';
import {
AUTH_TIMEOUT,
Expand All @@ -30,6 +30,7 @@ import {
sendErrorEvent,
getErrorEventData,
} from '../shared/telemetry/TelemetryUtils';
import RNSecureKeyStore from 'react-native-secure-key-store';

export const keyinvalidatedString =
'Key Invalidated due to biometric enrollment';
Expand Down Expand Up @@ -449,6 +450,9 @@ export const storeMachine =
});
},
getEncryptionKey: () => async callback => {
if (isIOS()) {
RNSecureKeyStore.setResetOnAppUninstallTo(false);
}
const existingCredentials = await Keychain.getGenericPassword();
if (existingCredentials) {
console.log('Credentials successfully loaded for user');
Expand Down

0 comments on commit 25311ff

Please sign in to comment.