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 @@ -3,6 +3,7 @@ import invariant from 'invariant'; import * as React from 'react'; +import { usingCommServicesAccessToken } from './services-utils.js'; import { IdentityClientContext } from '../shared/identity-client-context.js'; import { type IdentitySearchAuthMessage } from '../types/identity-search/auth-message-types.js'; @@ -12,7 +13,7 @@ const getAuthMetadata = identityContext.getAuthMetadata; return React.useCallback(async () => { - if (!getAuthMetadata) { + if (!getAuthMetadata || !usingCommServicesAccessToken) { return null; }