update()
Updates the current instance.
function update(params: UpdateParams): Promise<void>- Name
-
allowedOrigins? - Type
string[]- Description
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 the default origin ishttp://localhost:3000. For Capacitor.js, the origin iscapacitor://localhost.
- Name
-
preferredSignInStrategyWhenPasswordRequired? - Type
"password" | "otp" | "" | null- Description
Overrides the sign-in strategy that is preferred when a password is required. The value is only consulted when a password is required, and is dormant otherwise. Pass an empty string to clear the override. Passing
nullorundefinedleaves the current value unchanged.
- Name
-
testMode? - Type
boolean | null- Description
Toggles test mode for this instance, allowing the use of test email addresses and phone numbers. Defaults to
truefor development instances.
const response = await clerkClient.instances.update({
testMode: true,
})Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint PATCH/instance. See the BAPI reference for more information.
Feedback
Last updated on