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
5 changes: 5 additions & 0 deletions .changeset/electron-allowed-origins-dev-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

Update the `allowedOrigins` JSDoc on `clerkClient.instances.update()` and the `Instance` resource to note that Electron apps using `@clerk/electron` also need the renderer's dev server origin, for example `http://localhost:5173`, during development.
2 changes: 1 addition & 1 deletion packages/backend/src/api/endpoints/InstanceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type UpdateParams = {
clerkJsVersion?: string | null | undefined;
/** The development origin for the instance. */
developmentOrigin?: string | null | undefined;
/** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps using `@clerk/electron`, the origin is the custom renderer scheme registered with `createClerkBridge()`, for example `my-app://renderer`. For Capacitor.js, the origin is `capacitor://localhost`. */
/** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps using `@clerk/electron`, the origins are the custom renderer scheme registered with `createClerkBridge()`, for example `my-app://renderer`, and, during development, the renderer's dev server origin, for example `http://localhost:5173`. For Capacitor.js, the origin is `capacitor://localhost`. */
allowedOrigins?: Array<string> | undefined;
/** Whether the instance should use URL-based session syncing in development mode (i.e., without third-party cookies). */
urlBasedSessionSyncing?: boolean | null | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/api/resources/Instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class Instance {
readonly id: string,
/** The type of instance environment, either `'production'` or `'development'`. */
readonly environmentType: string,
/** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps using `@clerk/electron`, the origin is the custom renderer scheme registered with `createClerkBridge()`, for example `my-app://renderer`. For Capacitor.js, the origin is `capacitor://localhost`. */
/** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps using `@clerk/electron`, the origins are the custom renderer scheme registered with `createClerkBridge()`, for example `my-app://renderer`, and, during development, the renderer's dev server origin, for example `http://localhost:5173`. For Capacitor.js, the origin is `capacitor://localhost`. */
readonly allowedOrigins: Array<string> | null,
) {}

Expand Down
Loading