Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .changeset/shiny-glasses-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
'@clerk/chrome-extension': major
---

Expand the ability for `@clerk/chrome-extension` WebSSO to sync with host applications which use URL-based session syncing.

### How to Update

**WebSSO Host Permissions:**

_Local Development: You must have your explicit development domain added to your `manifest.json` file in order to use the WebSSO flow._

Example:

```json
{
"host_permissions": [
// ...
"http://localhost"
// ...
]
}
```

_Production: You must have your explicit Clerk Frontend API domain added to your `manifest.json` file in order to use the WebSSO flow._

Example:
```json
{
"host_permissions": [
// ...
"https://clerk.example.com"
// ...
]
}
```

**WebSSO Provider settings:**

```tsx
<ClerkProvider
publishableKey={publishableKey}
routerPush={to => navigate(to)}
routerReplace={to => navigate(to, { replace: true })}
syncSessionWithTab

// tokenCache is now storageCache (See below)
storageCache={/* ... */}
>
```

**WebSSO Storage Cache Interface:**

With the prop change from `tokenCache` to `storageCache`, the interface has been expanded to allow for more flexibility.

The new interface is as follows:

```ts
type StorageCache = {
createKey: (...keys: string[]) => string;
get: <T = any>(key: string) => Promise<T>;
remove: (key: string) => Promise<void>;
set: (key: string, value: string) => Promise<void>;
};
```
Loading