Page MenuHomePhabricator

D11759.diff
No OneTemporary

D11759.diff

diff --git a/lib/utils/identity-search-utils.js b/lib/utils/identity-search-utils.js
--- a/lib/utils/identity-search-utils.js
+++ b/lib/utils/identity-search-utils.js
@@ -11,13 +11,20 @@
export function useGetIdentitySearchAuthMessage(): () => Promise<?IdentitySearchAuthMessage> {
const loggedIn = useSelector(isLoggedIn);
+ const commServicesAccessToken = useSelector(
+ state => state.commServicesAccessToken,
+ );
const identityContext = React.useContext(IdentityClientContext);
invariant(identityContext, 'Identity context should be set');
const getAuthMetadata = identityContext.getAuthMetadata;
return React.useCallback(async () => {
- if (!loggedIn || !usingCommServicesAccessToken) {
+ if (
+ !loggedIn ||
+ !usingCommServicesAccessToken ||
+ !commServicesAccessToken
+ ) {
return null;
}
@@ -38,5 +45,5 @@
deviceID: authMetadata?.deviceID,
accessToken: authMetadata?.accessToken,
};
- }, [getAuthMetadata, loggedIn]);
+ }, [commServicesAccessToken, getAuthMetadata, loggedIn]);
}
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -146,6 +146,7 @@
'syncedMetadataStore',
'userStore',
'auxUserStore',
+ 'commServicesAccessToken',
];
function handleReduxMigrationFailure(oldState: AppState): AppState {

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 12:56 AM (19 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2857925
Default Alt Text
D11759.diff (1 KB)

Event Timeline