diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js --- a/lib/actions/user-actions.js +++ b/lib/actions/user-actions.js @@ -95,7 +95,6 @@ import type { CurrentUserInfo, UserInfo, - PasswordUpdate, LoggedOutUserInfo, } from '../types/user-types.js'; import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js'; @@ -104,10 +103,7 @@ import { promiseWithTimeout } from '../utils/promises.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector } from '../utils/redux-utils.js'; -import { - usingCommServicesAccessToken, - useIsRestoreFlowEnabled, -} from '../utils/services-utils.js'; +import { useIsRestoreFlowEnabled } from '../utils/services-utils.js'; const loggedOutUserInfo: LoggedOutUserInfo = { anonymous: true, @@ -196,11 +192,7 @@ })(); const identityPromise = (async () => { - if ( - skipIdentityLogOut || - !usingCommServicesAccessToken || - !commServicesAccessToken - ) { + if (skipIdentityLogOut || !commServicesAccessToken) { return; } if (!identityClient) { @@ -330,10 +322,6 @@ ); return React.useCallback(async () => { - invariant( - usingCommServicesAccessToken, - 'identityLogOut can only be called when usingCommServicesAccessToken', - ); if (!identityClient) { throw new Error('Identity service client is not initialized'); } @@ -601,19 +589,6 @@ }; }; -function useDeleteKeyserverAccount(): ( - keyserverIDs?: $ReadOnlyArray, -) => Promise { - const preRequestUserState = usePreRequestUserState(); - const callKeyserverDeleteAccount = useKeyserverCall(deleteKeyserverAccount); - - return React.useCallback( - (keyserverIDs?: $ReadOnlyArray) => - callKeyserverDeleteAccount({ preRequestUserState, keyserverIDs }), - [callKeyserverDeleteAccount, preRequestUserState], - ); -} - const deleteAccountActionTypes = Object.freeze({ started: 'DELETE_ACCOUNT_STARTED', success: 'DELETE_ACCOUNT_SUCCESS', @@ -640,21 +615,18 @@ return React.useCallback( async password => { - if (usingCommServicesAccessToken) { - if (!identityClient) { - throw new Error('Identity service client is not initialized'); - } - const { deleteWalletUser, deletePasswordUser } = identityClient; - if (!deleteWalletUser || !deletePasswordUser) { - throw new Error('Delete user method unimplemented'); - } - - await broadcastAccountDeletion(); - if (password) { - await deletePasswordUser(password); - } else { - await deleteWalletUser(); - } + if (!identityClient) { + throw new Error('Identity service client is not initialized'); + } + const { deleteWalletUser, deletePasswordUser } = identityClient; + if (!deleteWalletUser || !deletePasswordUser) { + throw new Error('Delete user method unimplemented'); + } + await broadcastAccountDeletion(); + if (password) { + await deletePasswordUser(password); + } else { + await deleteWalletUser(); } try { const keyserverResult = await callKeyserverDeleteAccount({ @@ -669,9 +641,6 @@ }, }; } catch (e) { - if (!usingCommServicesAccessToken) { - throw e; - } console.log( 'Failed to delete account on keyserver:', getMessageForException(e), @@ -711,11 +680,6 @@ return React.useCallback( async password => { - invariant( - usingCommServicesAccessToken, - 'deleteDiscardedIdentityAccount can only be called when ' + - 'usingCommServicesAccessToken', - ); if (!identityClient) { throw new Error('Identity service client is not initialized'); } @@ -1291,25 +1255,6 @@ }; }; -function useLegacyLogIn(): ( - input: LegacyLogInInfo, -) => Promise { - return useKeyserverCall(legacyLogIn); -} - -const changeKeyserverUserPasswordActionTypes = Object.freeze({ - started: 'CHANGE_KEYSERVER_USER_PASSWORD_STARTED', - success: 'CHANGE_KEYSERVER_USER_PASSWORD_SUCCESS', - failed: 'CHANGE_KEYSERVER_USER_PASSWORD_FAILED', -}); -const changeKeyserverUserPassword = - ( - callSingleKeyserverEndpoint: CallSingleKeyserverEndpoint, - ): ((passwordUpdate: PasswordUpdate) => Promise) => - async passwordUpdate => { - await callSingleKeyserverEndpoint('update_account', passwordUpdate); - }; - const changeIdentityUserPasswordActionTypes = Object.freeze({ started: 'CHANGE_IDENTITY_USER_PASSWORD_STARTED', success: 'CHANGE_IDENTITY_USER_PASSWORD_SUCCESS', @@ -1586,13 +1531,10 @@ }>; export { - changeKeyserverUserPasswordActionTypes, - changeKeyserverUserPassword, changeIdentityUserPasswordActionTypes, useChangeIdentityUserPassword, claimUsernameActionTypes, useClaimUsername, - useDeleteKeyserverAccount, deleteKeyserverAccountActionTypes, getOlmSessionInitializationDataActionTypes, getOlmSessionInitializationData, @@ -1602,7 +1544,6 @@ useIdentityPasswordLogIn, useIdentityWalletLogIn, useIdentitySecondaryDeviceLogIn, - useLegacyLogIn, legacyLogInActionTypes, useBaseLogOut, useLogOut, diff --git a/lib/components/base-auto-join-community-handler.react.js b/lib/components/base-auto-join-community-handler.react.js --- a/lib/components/base-auto-join-community-handler.react.js +++ b/lib/components/base-auto-join-community-handler.react.js @@ -12,7 +12,6 @@ farcasterChannelTagBlobHash, useJoinCommunity, } from '../shared/community-utils.js'; -import type { AuthMetadata } from '../shared/identity-client-context.js'; import { IdentityClientContext } from '../shared/identity-client-context.js'; import type { KeyserverOverride } from '../shared/invite-links.js'; import type { @@ -26,10 +25,7 @@ import { useCurrentUserFID } from '../utils/farcaster-utils.js'; import { promiseAll } from '../utils/promises.js'; import { useSelector } from '../utils/redux-utils.js'; -import { - usingCommServicesAccessToken, - createDefaultHTTPRequestHeaders, -} from '../utils/services-utils.js'; +import { createDefaultHTTPRequestHeaders } from '../utils/services-utils.js'; import sleep from '../utils/sleep.js'; type JoinStatus = 'inactive' | 'joining' | 'joined'; @@ -94,18 +90,11 @@ } void (async () => { - const authMetadataPromise: Promise = (async () => { - if (!usingCommServicesAccessToken) { - return undefined; - } - return await getAuthMetadata(); - })(); - const followedFarcasterChannelsPromise = fcCache.getFollowedFarcasterChannelsForFID(fid); const [authMetadata, followedFarcasterChannels] = await Promise.all([ - authMetadataPromise, + getAuthMetadata(), followedFarcasterChannelsPromise, ]); diff --git a/lib/components/farcaster-data-handler.react.js b/lib/components/farcaster-data-handler.react.js --- a/lib/components/farcaster-data-handler.react.js +++ b/lib/components/farcaster-data-handler.react.js @@ -18,7 +18,6 @@ } from '../utils/farcaster-utils.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector, useDispatch } from '../utils/redux-utils.js'; -import { usingCommServicesAccessToken } from '../utils/services-utils.js'; type Props = { +children?: React.Node, @@ -208,10 +207,6 @@ ]); React.useEffect(() => { - if (!usingCommServicesAccessToken) { - return; - } - void handleFarcasterMutuals(); void handleUserStoreFIDs(); void handleCurrentUserFID(); diff --git a/lib/components/platform-details-synchronizer.react.js b/lib/components/platform-details-synchronizer.react.js --- a/lib/components/platform-details-synchronizer.react.js +++ b/lib/components/platform-details-synchronizer.react.js @@ -6,7 +6,6 @@ import { isLoggedIn } from '../selectors/user-selectors.js'; import { IdentityClientContext } from '../shared/identity-client-context.js'; import { useSelector } from '../utils/redux-utils.js'; -import { usingCommServicesAccessToken } from '../utils/services-utils.js'; function PlatformDetailsSynchronizer(): React.Node { const client = React.useContext(IdentityClientContext); @@ -36,7 +35,7 @@ const hasRun = React.useRef(false); React.useEffect(() => { - if (!usingCommServicesAccessToken || hasRun.current) { + if (hasRun.current) { return; } hasRun.current = true; diff --git a/lib/components/prekeys-handler.react.js b/lib/components/prekeys-handler.react.js --- a/lib/components/prekeys-handler.react.js +++ b/lib/components/prekeys-handler.react.js @@ -7,7 +7,6 @@ import { IdentityClientContext } from '../shared/identity-client-context.js'; import { getConfig } from '../utils/config.js'; import { useSelector } from '../utils/redux-utils.js'; -import { usingCommServicesAccessToken } from '../utils/services-utils.js'; // Time after which rotation is started const PREKEY_ROTATION_TIMEOUT = 3 * 1000; // in milliseconds @@ -22,9 +21,6 @@ if (!loggedIn) { return undefined; } - if (!usingCommServicesAccessToken) { - return undefined; - } const timeoutID = setTimeout(async () => { try { diff --git a/lib/handlers/user-infos-handler.react.js b/lib/handlers/user-infos-handler.react.js --- a/lib/handlers/user-infos-handler.react.js +++ b/lib/handlers/user-infos-handler.react.js @@ -18,10 +18,7 @@ import { getMessageForException, FetchTimeout } from '../utils/errors.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector } from '../utils/redux-utils.js'; -import { - relyingOnAuthoritativeKeyserver, - usingCommServicesAccessToken, -} from '../utils/services-utils.js'; +import { relyingOnAuthoritativeKeyserver } from '../utils/services-utils.js'; function UserInfosHandler(): React.Node { const client = React.useContext(IdentityClientContext); @@ -56,7 +53,7 @@ const newUserIDs = Object.keys(userInfosWithMissingUsernames).filter( id => !requestedIDsRef.current.has(id), ); - if (!usingCommServicesAccessToken || newUserIDs.length === 0) { + if (newUserIDs.length === 0) { return; } void (async () => { @@ -148,11 +145,7 @@ id => !requestedDeviceListsIDsRef.current.has(id), ); - if ( - !usingCommServicesAccessToken || - usersWithMissingDeviceList.length === 0 || - !socketState.isAuthorized - ) { + if (usersWithMissingDeviceList.length === 0 || !socketState.isAuthorized) { return; } void (async () => { diff --git a/lib/hooks/thread-search-hooks.js b/lib/hooks/thread-search-hooks.js --- a/lib/hooks/thread-search-hooks.js +++ b/lib/hooks/thread-search-hooks.js @@ -3,9 +3,7 @@ import * as React from 'react'; import { useUsersSupportThickThreads } from './user-identities-hooks.js'; -import { searchUsers as searchUserCall } from '../actions/user-actions.js'; import { useGlobalThreadSearchIndex } from '../components/global-search-index-provider.react.js'; -import { useLegacyAshoatKeyserverCall } from '../keyserver-conn/legacy-keyserver-call.js'; import { usersWithPersonalThreadSelector } from '../selectors/user-selectors.js'; import { useForwardLookupSearchText, @@ -14,7 +12,6 @@ import { useOldestPrivateThreadInfo } from '../shared/thread-utils.js'; import type { GlobalAccountUserInfo } from '../types/user-types.js'; import { useSelector } from '../utils/redux-utils.js'; -import { usingCommServicesAccessToken } from '../utils/services-utils.js'; export type UserSearchResult = $ReadOnly<{ ...GlobalAccountUserInfo, @@ -48,25 +45,6 @@ [usersWithPersonalThread, viewerID, oldestPrivateThreadInfo], ); - const legacyCallSearchUsers = useLegacyAshoatKeyserverCall(searchUserCall); - const legacySearchUsers = React.useCallback( - async (usernamePrefix: string) => { - if (usernamePrefix.length === 0) { - filterAndSetUserResults([]); - return; - } - - const { userInfos } = await legacyCallSearchUsers(usernamePrefix); - filterAndSetUserResults( - userInfos.map(userInfo => ({ - ...userInfo, - supportThickThreads: false, - })), - ); - }, - [filterAndSetUserResults, legacyCallSearchUsers], - ); - const [threadSearchResults, setThreadSearchResults] = React.useState( new Set(), ); @@ -78,16 +56,8 @@ void (async () => { const results = threadSearchIndex.getSearchResults(searchText); setThreadSearchResults(new Set(results)); - if (!usingCommServicesAccessToken) { - await legacySearchUsers(forwardLookupSearchText); - } })(); - }, [ - searchText, - forwardLookupSearchText, - threadSearchIndex, - legacySearchUsers, - ]); + }, [searchText, forwardLookupSearchText, threadSearchIndex]); const usersSupportThickThreads = useUsersSupportThickThreads(); const identitySearchUsers = useSearchUsers( @@ -96,10 +66,6 @@ ); React.useEffect(() => { void (async () => { - if (!usingCommServicesAccessToken) { - return; - } - const userIDsSupportingThickThreads = await usersSupportThickThreads( identitySearchUsers.map(user => user.id), ); diff --git a/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js b/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js --- a/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js +++ b/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js @@ -21,7 +21,6 @@ setActiveSessionRecoveryActionType, type CallKeyserverEndpoint, } from './keyserver-conn-types.js'; -import { canResolveKeyserverSessionInvalidation } from './recovery-utils.js'; import { recoveryFromReduxActionSources, type RecoveryFromReduxActionSource, @@ -141,13 +140,11 @@ undefined, keyserverID, ); - const canResolveInvalidation = - canRecoverSession && canResolveKeyserverSessionInvalidation(); // This function gets called before callSingleKeyserverEndpoint sends a // request, to make sure that we're not in the middle of trying to recover // an invalidated cookie const waitIfCookieInvalidated = () => { - if (!canResolveInvalidation) { + if (!canRecoverSession) { // If there is no way to resolve the session invalidation, // just let the caller callSingleKeyserverEndpoint instance continue return Promise.resolve(null); @@ -175,7 +172,7 @@ sessionChange: ClientSessionChange, error: ?string, ) => { - if (!canResolveInvalidation) { + if (!canRecoverSession) { // When invalidation recovery is supported, we let that code call // setNewSession. When it isn't supported, we call it directly here. // Once usingCommServicesAccessToken is true, we should consider diff --git a/lib/keyserver-conn/keyserver-connection-handler.js b/lib/keyserver-conn/keyserver-connection-handler.js --- a/lib/keyserver-conn/keyserver-connection-handler.js +++ b/lib/keyserver-conn/keyserver-connection-handler.js @@ -13,7 +13,6 @@ cookieSelector, } from '../selectors/keyserver-selectors.js'; import { isLoggedInToKeyserver } from '../selectors/user-selectors.js'; -import { useInitialNotificationsEncryptedMessage } from '../shared/crypto-utils.js'; import { useStaffAlert } from '../shared/staff-utils.js'; import type { BaseSocketProps } from '../socket/socket.react.js'; import { @@ -25,10 +24,7 @@ import { getMessageForException } from '../utils/errors.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector } from '../utils/redux-utils.js'; -import { - usingCommServicesAccessToken, - relyingOnAuthoritativeKeyserver, -} from '../utils/services-utils.js'; +import { relyingOnAuthoritativeKeyserver } from '../utils/services-utils.js'; type Props = { ...BaseSocketProps, @@ -141,13 +137,6 @@ .activeSessionRecovery, ); - // This async function asks the keyserver for its keys, whereas performAuth - // above gets the keyserver's keys from the identity service - const getInitialNotificationsEncryptedMessageForRecovery = - useInitialNotificationsEncryptedMessage(keyserverID); - - const { resolveKeyserverSessionInvalidationUsingNativeCredentials } = - getConfig(); const innerPerformRecovery = React.useCallback( ( recoveryActionSource: RecoveryFromReduxActionSource, @@ -162,44 +151,22 @@ 'Performing session recovery', `source=${recoveryActionSource}`, ); - if (usingCommServicesAccessToken) { - try { - await rawKeyserverAuth({ - authActionSource: recoveryActionSource, - setInProgress, - hasBeenCancelled, - doNotRegister: true, - })(innerCallKeyserverEndpoint); - } catch (e) { - console.log( - `Tried to recover session with keyserver ${keyserverID} but got ` + - `error. Exception: ` + - (getMessageForException(e) ?? '{no exception message}'), - ); - } - return; - } - if (!resolveKeyserverSessionInvalidationUsingNativeCredentials) { - return; + try { + await rawKeyserverAuth({ + authActionSource: recoveryActionSource, + setInProgress, + hasBeenCancelled, + doNotRegister: true, + })(innerCallKeyserverEndpoint); + } catch (e) { + console.log( + `Tried to recover session with keyserver ${keyserverID} but got ` + + `error. Exception: ` + + (getMessageForException(e) ?? '{no exception message}'), + ); } - await resolveKeyserverSessionInvalidationUsingNativeCredentials( - callSingleKeyserverEndpoint, - innerCallKeyserverEndpoint, - dispatchActionPromise, - recoveryActionSource, - keyserverID, - getInitialNotificationsEncryptedMessageForRecovery, - hasBeenCancelled, - ); }, - [ - showAlertToStaff, - rawKeyserverAuth, - resolveKeyserverSessionInvalidationUsingNativeCredentials, - dispatchActionPromise, - keyserverID, - getInitialNotificationsEncryptedMessageForRecovery, - ], + [showAlertToStaff, rawKeyserverAuth, keyserverID], ); const keyserverRecoveryLogIn = useKeyserverRecoveryLogIn(keyserverID); @@ -280,7 +247,6 @@ } if ( - !usingCommServicesAccessToken || isUserLoggedInToKeyserver || !hasAccessToken || !hasCurrentUserInfo || diff --git a/lib/keyserver-conn/recovery-utils.js b/lib/keyserver-conn/recovery-utils.js --- a/lib/keyserver-conn/recovery-utils.js +++ b/lib/keyserver-conn/recovery-utils.js @@ -27,31 +27,10 @@ type PreRequestUserState, } from '../types/session-types.js'; import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js'; -import { getConfig } from '../utils/config.js'; import { promiseAll } from '../utils/promises.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector, useDispatch } from '../utils/redux-utils.js'; -import { - usingCommServicesAccessToken, - relyingOnAuthoritativeKeyserver, -} from '../utils/services-utils.js'; - -// This function is a shortcut that tells us whether it's worth even trying to -// call resolveKeyserverSessionInvalidation -function canResolveKeyserverSessionInvalidation(): boolean { - if (usingCommServicesAccessToken) { - // We can always try to resolve a keyserver session invalidation - // automatically using the Olm auth responder - return true; - } - const { resolveKeyserverSessionInvalidationUsingNativeCredentials } = - getConfig(); - // If we can't use the Olm auth responder, then we can only resolve a - // keyserver session invalidation on native, where we have access to the - // user's native credentials. Note that we can't do this for ETH users, but we - // don't know if the user is an ETH user from this function - return !!resolveKeyserverSessionInvalidationUsingNativeCredentials; -} +import { relyingOnAuthoritativeKeyserver } from '../utils/services-utils.js'; // This function attempts to resolve an invalid keyserver session. A session can // become invalid when a keyserver invalidates it, or due to inconsistent client @@ -257,8 +236,4 @@ ); } -export { - canResolveKeyserverSessionInvalidation, - resolveKeyserverSessionInvalidation, - useKeyserverRecoveryLogIn, -}; +export { resolveKeyserverSessionInvalidation, useKeyserverRecoveryLogIn }; diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js --- a/lib/reducers/user-reducer.js +++ b/lib/reducers/user-reducer.js @@ -59,10 +59,7 @@ UserStore, } from '../types/user-types.js'; import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js'; -import { - relyingOnAuthoritativeKeyserver, - usingCommServicesAccessToken, -} from '../utils/services-utils.js'; +import { relyingOnAuthoritativeKeyserver } from '../utils/services-utils.js'; function handleCurrentUserUpdates( state: ?CurrentUserInfo, @@ -111,10 +108,6 @@ const actionUserInfo = action.payload.sessionChange.currentUserInfo; if (!actionUserInfo?.id) { return actionUserInfo; - } else if (!usingCommServicesAccessToken) { - if (!_isEqual(actionUserInfo)(state)) { - return actionUserInfo; - } } else if (!state?.id || actionUserInfo.id !== state.id) { console.log( 'keyserver auth returned a different user info than identity login', @@ -231,9 +224,6 @@ newUserInfos: UserInfos, stateUserInfos: UserInfos, ): UserInfos { - if (!usingCommServicesAccessToken) { - return newUserInfos; - } let result: UserInfos = {}; for (const id in newUserInfos) { const username = stateUserInfos[id] ? stateUserInfos[id].username : null; diff --git a/lib/shared/search-utils.js b/lib/shared/search-utils.js --- a/lib/shared/search-utils.js +++ b/lib/shared/search-utils.js @@ -52,7 +52,6 @@ import { values } from '../utils/objects.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector } from '../utils/redux-utils.js'; -import { usingCommServicesAccessToken } from '../utils/services-utils.js'; const notFriendNotice = 'not friend'; @@ -466,7 +465,7 @@ return; } const searchUsersPromise = (async () => { - if (usingCommServicesAccessToken && identitySearchSocketConnected) { + if (identitySearchSocketConnected) { try { const identitySearchResult = await callIdentitySearchUsers( forwardLookupSearchText, diff --git a/lib/shared/session-utils.js b/lib/shared/session-utils.js --- a/lib/shared/session-utils.js +++ b/lib/shared/session-utils.js @@ -16,8 +16,6 @@ IdentityCallPreRequestUserState, } from '../types/session-types.js'; import type { CurrentUserInfo } from '../types/user-types.js'; -import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js'; -import { usingCommServicesAccessToken } from '../utils/services-utils.js'; function invalidSessionDowngrade( currentReduxState: AppState, @@ -54,14 +52,6 @@ actionCurrentUserInfo: ?CurrentUserInfo, preRequestUserState: ?IdentityCallPreRequestUserState, ): boolean { - if (!usingCommServicesAccessToken) { - return invalidSessionDowngrade( - currentReduxState, - actionCurrentUserInfo, - preRequestUserState, - authoritativeKeyserverID(), - ); - } // If this action represents a session downgrade - oldState has a loggedIn // currentUserInfo, but the action has an anonymous one - then it is only // valid if the currentUserInfo used for the request matches what oldState diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js --- a/lib/types/redux-types.js +++ b/lib/types/redux-types.js @@ -498,22 +498,6 @@ +payload?: void, +loadingInfo: LoadingInfo, } - | { - +type: 'CHANGE_KEYSERVER_USER_PASSWORD_STARTED', - +payload?: void, - +loadingInfo: LoadingInfo, - } - | { - +type: 'CHANGE_KEYSERVER_USER_PASSWORD_FAILED', - +error: true, - +payload: Error, - +loadingInfo: LoadingInfo, - } - | { - +type: 'CHANGE_KEYSERVER_USER_PASSWORD_SUCCESS', - +payload?: void, - +loadingInfo: LoadingInfo, - } | { +type: 'CHANGE_IDENTITY_USER_PASSWORD_STARTED', +payload?: void, 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,7 +3,6 @@ import invariant from 'invariant'; import * as React from 'react'; -import { usingCommServicesAccessToken } from './services-utils.js'; import { isLoggedIn } from '../selectors/user-selectors.js'; import { IdentityClientContext } from '../shared/identity-client-context.js'; import { type IdentitySearchAuthMessage } from '../types/identity-search/auth-message-types.js'; @@ -20,11 +19,7 @@ const getAuthMetadata = identityContext.getAuthMetadata; return React.useCallback(async () => { - if ( - !loggedIn || - !usingCommServicesAccessToken || - !commServicesAccessToken - ) { + if (!loggedIn || !commServicesAccessToken) { return null; } diff --git a/lib/utils/services-utils.js b/lib/utils/services-utils.js --- a/lib/utils/services-utils.js +++ b/lib/utils/services-utils.js @@ -5,11 +5,6 @@ import { getMessageForException } from './errors.js'; import type { AuthMetadata } from '../shared/identity-client-context.js'; -// If this is true then we're using the identity service for auth. After we -// auth, the identity service gives us a CSAT, which we can use to auth with -// other Comm services. -const usingCommServicesAccessToken = true; - // If this is true, then the app is able to support multiple keyservers. This // requires the use of Tunnelbroker and the backup service to persist and sync // the KeyserverStore. @@ -61,7 +56,6 @@ } export { - usingCommServicesAccessToken, supportingMultipleKeyservers, relyingOnAuthoritativeKeyserver, useIsRestoreFlowEnabled,