Plugin
The plugin provides your application the active session and user context to Clerk's composables and other components.
Usage
ts
import { createApp } from 'vue'
import App from './App.vue'
import { clerkPlugin } from 'vue-clerk'
const app = createApp(App)
app.use(clerkPlugin, {
publishableKey: PUBLISHABLE_KEY
})
app.mount('#app')
Properties
Name | Type | Description |
---|---|---|
afterMultiSessionSingleSignOutUrl | string | The full URL or path to navigate to after a signing out from a currently active account in a multi-session app. |
afterSignOutUrl | string | The full URL or path to navigate to after a successful sign-out. |
allowedRedirectOrigins? | Array<string |RegExp> | Optional array of domains used to validate against the query param of an auth redirect. If no match is made, the redirect is considered unsafe and the default redirect will be used with a warning passed to the console. |
appearance? | Appearance / undefined | Optional object to style your components. Will only affect Clerk Components and not Account Portal pages. |
clerkJSUrl? | string | Define the URL that vue-clerk should hot-load @clerk/clerk-js from. |
clerkJSVariant? | string | If your web application only uses Control components, you can set this value to headless and load a minimal ClerkJS bundle for optimal page performance. |
clerkJSVersion? | string | Define the npm version for @clerk/clerk-js . |
domain? | string | ((url: URL) => boolean) | This option sets the domain of the satellite application. If your application is a satellite application, this option is required. |
isSatellite? | boolean | ((url: URL) => boolean) | This option defines that the application is a satellite application. |
localization | Localization / undefined | Optional object to localize your components. Will only affect Clerk Components and not Account Portal pages. |
publishableKey | string | Clerk publishable key for your instance. This can be found in your Clerk Dashboard on the API Keys page. |
routerPush? | (to: string) => Promise<unknown> | void | A function which takes the destination path as an argument and performs a "push" navigation. |
routerReplace? | (to: string) => Promise<unknown> | void | A function which takes the destination path as an argument and performs a "replace" navigation. |
signInFallbackRedirectUrl | string | The fallback URL to redirect to after the user signs in, if there's no redirect_url in the path already. Defaults to / . It's recommended to use the environment variable instead. |
signUpFallbackRedirectUrl | string | The fallback URL to redirect to after the user signs up, if there's no redirect_url in the path already. Defaults to / . It's recommended to use the environment variable instead. |
signInForceRedirectUrl | string | If provided, this URL will always be redirected to after the user signs in. It's recommended to use the environment variable instead. |
signUpForceRedirectUrl | string | If provided, this URL will always be redirected to after the user signs up. It's recommended to use the environment variable instead. |
signInUrl | string | This url will be used for any redirects that might happen and needs to point to your primary application. This option is optional for production instances and required for development instances. It's recommended to use the environment variable instead. |
signUpUrl | string | This URL will be used for any redirects that might happen and needs to point to your primary application on the client-side. This option is optional for production instances and required for development instances. It's recommended to use the environment variable instead. |
supportEmail? | string | Optional support email for display in authentication screens. Will only affect Clerk Components and not Account Portal pages. |
telemetry | false | { disabled?: boolean; debug?: boolean } | Controls whether or not Clerk will collect telemetry data. |