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
Name | Type | Description |
---|
to | string | The route to create a URL towards |
options | BuildUrlWithAuthParams | Options to apply toward the URL builder |
BuildUrlWithAuthParams
Name | Type | Description |
---|
useQueryParam | boolean | null | undefined | Controls if dev browser JWT is added as a query param |
buildUrlWithAuth()
returns
Type | Description |
---|
string | The 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
Name | Type | Description |
---|
options | RedirectOptions | undefined | Options used to control the redirect in the constructed URL |
buildSignInUrl()
returns
Type | Description |
---|
string | The 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
Name | Type | Description |
---|
options | RedirectOptions | undefined | Options used to control the redirect in the constructed URL |
Returns
Type | Description |
---|
string | The 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
Type | Description |
---|
string | The 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
Type | Description |
---|
string | The 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
Type | Description |
---|
string | The 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
Type | Description |
---|
string | The configured url where <OrganizationProfile /> is mounted or a custom organization-profile page is rendered. |
Last updated on March 14, 2024