Skip to content

Commit 0bb7903

Browse files
committed
chore(extension): Update to syncHost
1 parent 67cc429 commit 0bb7903

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

packages/chrome-extension/src/react/ClerkProvider.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ type SyncHost = `${'http' | 'https'}://${string}`;
1010
type ChromeExtensionClerkProviderProps = ClerkReactProviderProps & {
1111
storageCache?: StorageCache;
1212
syncHost?: SyncHost;
13-
syncSessionWithTab?: boolean;
1413
};
1514

1615
export function ClerkProvider(props: ChromeExtensionClerkProviderProps): JSX.Element | null {
17-
const { children, storageCache, syncHost, syncSessionWithTab, ...rest } = props;
16+
const { children, storageCache, syncHost, ...rest } = props;
1817
const { publishableKey = '' } = props;
1918

2019
const [clerkInstance, setClerkInstance] = React.useState<Clerk | null>(null);
2120

2221
React.useEffect(() => {
2322
void (async () => {
24-
setClerkInstance(await createClerkClient({ publishableKey, storageCache, syncHost, syncSessionWithTab }));
23+
setClerkInstance(await createClerkClient({ publishableKey, storageCache, syncHost }));
2524
})();
26-
}, [publishableKey, storageCache, syncHost, syncSessionWithTab]);
25+
}, [publishableKey, storageCache, syncHost]);
2726

2827
if (!clerkInstance) {
2928
return null;
@@ -33,7 +32,7 @@ export function ClerkProvider(props: ChromeExtensionClerkProviderProps): JSX.Ele
3332
<ClerkReactProvider
3433
{...rest}
3534
Clerk={clerkInstance}
36-
standardBrowser={!syncSessionWithTab}
35+
standardBrowser={!syncHost}
3736
>
3837
{children}
3938
</ClerkReactProvider>

playground/chrome-extension/src/background.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ chrome.runtime.onInstalled.addListener(async () => {
99
async function getToken() {
1010
const clerk = await __unstable__createClerkClient({
1111
publishableKey,
12-
syncSessionWithTab: true,
12+
syncHost: 'http://localhost:4011',
1313
});
1414
return await clerk.session?.getToken();
1515
}

0 commit comments

Comments
 (0)