diff --git a/native/data/sensitive-data-cleaner.react.js b/native/data/sensitive-data-cleaner.react.js
new file mode 100644
--- /dev/null
+++ b/native/data/sensitive-data-cleaner.react.js
@@ -0,0 +1,30 @@
+// @flow
+
+import * as React from 'react';
+import ExitApp from 'react-native-exit-app';
+
+import { useSelector } from '../redux/redux-utils';
+
+function SensitiveDataCleaner(): null {
+ const userIsLoggedIn = useSelector(state =>
+ state.currentUserInfo && !state.currentUserInfo.anonymous ? true : false,
+ );
+ React.useEffect(() => {
+ if (userIsLoggedIn) {
+ return;
+ }
+ try {
+ global.CommCoreModule.clearSensitiveData();
+ } catch (e) {
+ if (__DEV__) {
+ throw e;
+ } else {
+ console.log(e.message);
+ ExitApp.exitApp();
+ }
+ }
+ }, [userIsLoggedIn]);
+ return null;
+}
+
+export { SensitiveDataCleaner };
diff --git a/native/root.react.js b/native/root.react.js
--- a/native/root.react.js
+++ b/native/root.react.js
@@ -22,6 +22,7 @@
import PersistedStateGate from './components/persisted-state-gate';
import ConnectedStatusBar from './connected-status-bar.react';
import CoreDataProvider from './data/core-data-provider.react';
+import { SensitiveDataCleaner } from './data/sensitive-data-cleaner.react';
import { SQLiteContextProvider } from './data/sqlite-context-provider';
import ErrorBoundary from './error-boundary.react';
import InputStateContainer from './input/input-state-container.react';
@@ -222,6 +223,7 @@
+
>
);
let navigation;