Redirect methods
These methods on the Clerk
class help you manage route navigation based on the Clerk dashboard configuration.
navigate()
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
- Name
to
- Type
string | undefined
- Description
The route to navigate to.
function redirectWithAuth(to: string): Promise<unknown>;
Redirects to the provided url after decorating it with the auth token for development instances.
Properties
- Name
to
- Type
string | undefined
- Description
The route to navigate to
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
- Name
options?
- Type
SignInRedirectOptions
|undefined
- Description
Options to use in the redirect
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
- Name
options?
- Type
SignUpRedirectOptions
|undefined
- Description
Options to use in the redirect
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
redirectToCreateOrganization()
function redirectToCreateOrganization(): Promise<unknown>;
Redirects to the configured URL where <CreateOrganization />
is mounted. This method uses the navigate()
method under the hood.
Returns
redirectToOrganizationProfile()
function redirectToOrganizationProfile(): Promise<unknown>;
Redirects to the configured URL where <OrganizationProfile />
is mounted. This method uses the navigate()
method under the hood.
Returns
redirectToHome()
(deprecated)
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.