Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

Redirect methods

These are all methods on the Clerk class that help you manage route navigation based on the Clerk dashboard configuration.

function navigate(to: string | undefined): Promise<unknown>;

Helper method which will use the custom push navigation function of your application to navigate to the provided URL or relative path. See the relevant section on routing for more information on navigation.

Properties

NameTypeDescription
tostring | undefinedThe route to navigate to.

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

redirectWithAuth()

function redirectWithAuth(to: string): Promise<unknown>;

Redirects to the provided url after decorating it with the auth token for development instances.

Properties

NameTypeDescription
tostring | undefinedThe route to navigate to

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

redirectToSignIn()

function redirectToSignIn(options?: SignInRedirectOptions): Promise<unknown>;

Redirects to the sign-in URL, as configured in your application's instance settings. This method uses the navigate() method under the hood.

Properties

NameTypeDescription
options?SignInRedirectOptions | undefinedOptions to use in the redirect

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

redirectToSignUp()

function redirectToSignUp(options?: SignUpRedirectOptions): Promise<unknown>;

Redirects to the sign-up URL, as configured in your application's instance settings. This method uses the navigate() method under the hood.

Properties

NameTypeDescription
options?SignUpRedirectOptions | undefinedOptions to use in the redirect

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

redirectToUserProfile()

function redirectToUserProfile(): Promise<unknown>;

Redirects to the user profile management URL, as configured in your application's instance settings. This method uses the navigate() method under the hood.

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

redirectToCreateOrganization()

function redirectToCreateOrganization(): Promise<unknown>;

Redirects to the configured URL where <CreateOrganization /> is mounted. This method uses the navigate() method under the hood.

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

redirectToOrganizationProfile()

function redirectToOrganizationProfile(): Promise<unknown>;

Redirects to the configured URL where <OrganizationProfile /> is mounted. This method uses the navigate() method under the hood.

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

redirectToHome() (deprecated)

Clerk.redirectToHome() is deprecated and will be removed in the Core 2(opens in a new tab) version of Clerk.

function redirectToHome(): Promise<unknown>;

Redirects to your app's homepage, as configured in your application's instance settings. This method uses the navigate() method under the hood.

Returns

TypeDescription
Promise<unknown>A promise that can be awaited in order to listen for the navigation to finish.
The inner value should not be relied on, as it can change based on the framework it's used within.

Last updated on March 4, 2024

What did you think of this content?

Clerk © 2024