Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

Build URLs

These are all methods on the Clerk class that help you manage URL creation on the Clerk dashboard configuration.

buildUrlWithAuth()

Decorates the provided url with the auth token for development instances.

function buildUrlWithAuth(to: string, options?: BuildUrlWithAuthParams): string;

buildUrlWithAuth() params

NameTypeDescription
tostringThe route to create a URL towards
optionsBuildUrlWithAuthParamsOptions to apply toward the URL builder

BuildUrlWithAuthParams

NameTypeDescription
useQueryParamboolean | null | undefinedControls if dev browser JWT is added as a query param

buildUrlWithAuth() returns

TypeDescription
stringThe built URL decorated with the auth token

buildSignInUrl()

Returns the configured url where <SignIn /> is mounted or a custom sign-in page is rendered.

function buildSignInUrl(options?: RedirectOptions): string;

buildSignInUrl() params

NameTypeDescription
optionsRedirectOptions | undefinedOptions used to control the redirect in the constructed URL

buildSignInUrl() returns

TypeDescription
stringThe built sign-in URL

buildSignUpUrl()

Returns the configured url where <SignUp /> is mounted or a custom sign-up page is rendered.

function buildSignUpUrl(options?: RedirectOptions): string;

buildSignUpUrl() params

NameTypeDescription
optionsRedirectOptions | undefinedOptions used to control the redirect in the constructed URL

Returns

TypeDescription
stringThe built sign-up URL

buildUserProfileUrl()

Returns the url where <UserProfile /> is mounted or a custom user-profile page is rendered.

function buildUserProfileUrl(): string;

buildUserProfileUrl() returns

TypeDescription
stringThe url where <UserProfile /> is mounted or a custom user-profile page is rendered.

buildHomeUrl()

Returns the url that you've configured in your Clerk Dashboard.

function buildHomeUrl(): string;

buildHomeUrl() returns

TypeDescription
stringThe url that you've configured in your Clerk Dashboard.

buildCreateOrganizationUrl()

Returns the configured url where <CreateOrganization /> is mounted or a custom create-organization page is rendered.

function buildCreateOrganizationUrl(): string;

buildCreateOrganizationUrl() returns

TypeDescription
stringThe configured url where <CreateOrganization /> is mounted or a custom create-organization page is rendered.

buildOrganizationProfileUrl()

Returns the configured url where <OrganizationProfile /> is mounted or a custom organization-profile page is rendered.

function buildOrganizationProfileUrl(): string;

buildOrganizationProfileUrl() returns

TypeDescription
stringThe configured url where <OrganizationProfile /> is mounted or a custom organization-profile page is rendered.

Last updated on March 14, 2024

What did you think of this content?

Clerk © 2024