diff --git a/apps/dotcom/src/hooks/useRemoteSyncClient.ts b/apps/dotcom/src/hooks/useRemoteSyncClient.ts index bdd134d4f..42bd6aab4 100644 --- a/apps/dotcom/src/hooks/useRemoteSyncClient.ts +++ b/apps/dotcom/src/hooks/useRemoteSyncClient.ts @@ -30,7 +30,7 @@ export function useRemoteSyncClient(opts: UseSyncClientConfig): RemoteTLStoreWit readyClient?: TLSyncClient error?: Error } | null>(null) - const { uri, roomId = 'default', userPreferences: prefs, getAccessToken } = opts + const { uri, roomId = 'default', userPreferences: prefs } = opts const store = useTLStore({ schema }) @@ -52,10 +52,6 @@ export function useRemoteSyncClient(opts: UseSyncClientConfig): RemoteTLStoreWit const withParams = new URL(uri) withParams.searchParams.set('sessionKey', TAB_ID) withParams.searchParams.set('storeId', store.id) - const accessToken = await getAccessToken?.() - if (accessToken) { - withParams.searchParams.set('accessToken', accessToken) - } return withParams.toString() }) @@ -95,7 +91,7 @@ export function useRemoteSyncClient(opts: UseSyncClientConfig): RemoteTLStoreWit client.close() socket.close() } - }, [getAccessToken, prefs, roomId, store, uri]) + }, [prefs, roomId, store, uri]) return useValue( 'remote synced store', diff --git a/apps/dotcom/src/utils/remote-sync/remote-sync.ts b/apps/dotcom/src/utils/remote-sync/remote-sync.ts index 715f24173..4d9cdeaed 100644 --- a/apps/dotcom/src/utils/remote-sync/remote-sync.ts +++ b/apps/dotcom/src/utils/remote-sync/remote-sync.ts @@ -15,5 +15,4 @@ export type UseSyncClientConfig = { roomId?: string userPreferences?: Signal snapshotForNewRoomRef?: { current: null | TLStoreSnapshot } - getAccessToken?: () => Promise | string | undefined | null }