Skip to content

Commit fb2d92d

Browse files
authored
Rename redirect and fallback url props (#943)
1 parent d3d44ba commit fb2d92d

16 files changed

+43
-34
lines changed

docs/components/authentication/sign-in.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ All props are optional.
2828
| `routing` | `'hash' \| 'path' \| 'virtual'` | The routing strategy for your pages.<br />Defaults to `'path'` in Next.js and Remix applications. Defaults to `hash` for all other SDK's. |
2929
| `path` | `string` | The path where the component is mounted on when `routing` is set to `path`. It is ignored in hash- and virtual-based routing.<br />For example: `/sign-in`. |
3030
| `signUpUrl` | `string` | Full URL or path to the sign up page. Use this property to provide the target of the 'Sign Up' link that's rendered. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
31-
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
32-
| `signInForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs in. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
31+
| `forceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs in. Takes priority over legacy props such as `afterSignInUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
32+
| `fallbackRedirectUrl?` | `string` | The fallback URL to redirect to after the user signs in, if there's no `redirect_url` in the path already. Defaults to `/`. Takes priority over legacy props such as `afterSignInUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
33+
| `signUpForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs up. Takes priority over legacy props such as `afterSignInUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
34+
| `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 `/`. Takes priority over legacy props such as `afterSignInUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
3335
| `initialValues` | [`SignInInitialValues`](/docs/references/javascript/types/sign-in-initial-values) | The values used to prefill the sign-in fields with. |
3436

3537
## Usage with frameworks

docs/components/authentication/sign-up.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ All props are optional.
2828
| `routing` | `'hash' \| 'path' \| 'virtual'` | The routing strategy for your pages. <br />Defaults to `'path'` in Next.js and Remix applications. Defaults to `hash` for all other SDK's. |
2929
| `path` | `string` | The path where the component is mounted on when `routing` is set to `path`. It is ignored in hash- and virtual-based routing.<br />For example: `/sign-up`. |
3030
| `signInUrl` | `string` | Full URL or path to the sign in page. Use this property to provide the target of the 'Sign In' link that's rendered. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
31-
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
32-
| `signUpForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs up. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
31+
| `forceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs up. Takes priority over legacy props such as `afterSignUpUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
32+
| `fallbackRedirectUrl?` | `string` | The fallback URL to redirect to after the user signs up, if there's no `redirect_url` in the path already. Defaults to `/`. Takes priority over legacy props such as `afterSignUpUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
33+
| `signInForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs in. Takes priority over legacy props such as `afterSignUpUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
34+
| `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 `/`. Takes priority over legacy props such as `afterSignUpUrl` and `redirectUrl`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
3335
| `initialValues` | [`SignUpInitialValues`](/docs/references/javascript/types/sign-up-initial-values) | The values used to prefill the sign-up fields with. |
3436

3537
## Usage with frameworks

docs/components/clerk-provider.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ The `<ClerkProvider>` component must be added to your React entrypoint.
9999
| `appearance?` | <code>[Appearance](/docs/components/customization/overview) \| undefined</code> | Optional object to style your components. Will only affect [Clerk Components][components-ref] and not [Account Portal][ap-ref] pages. |
100100
| `localization` | <code>[Localization](/docs/components/customization/localization) \| undefined</code> | Optional object to localize your components. Will only affect [Clerk Components][components-ref] and not [Account Portal][ap-ref] pages. |
101101
| `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. |
102-
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
103-
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
104102
| `signInForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs in. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
105103
| `signUpForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs up. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
104+
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
105+
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
106106

107107
| `isSatellite?` | `boolean \| ((url: URL) => boolean)` | This option defines that the application is a satellite application. |
108108
| `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. |

docs/components/control/authenticate-with-callback.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The `<AuthenticateWithRedirectCallback />` is used to complete a custom OAuth fl
141141

142142
| Name | Type | Description |
143143
| --- | --- | --- |
144-
| `afterSignInUrl` | `string` | Full URL or path to navigate to after successful sign in. Defaults to `/`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
144+
| `afterSignInUrl` (deprecated) | `string` | Full URL or path to navigate to after successful sign in. Defaults to `/`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. **`signInFallbackRedirectUrl` has priority over the legacy `afterSignInUrl`. Use `fallbackRedirectUrl` or `forceRedirectUrl` instead of `afterSignInUrl`.** |
145145
| `afterSignUpUrl` | `string` | Full URL or path to navigate to after successful sign up. Defaults to `/`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
146-
| `redirectUrl` | `string` | Full URL or path to navigate after successful sign in or sign up. This is the same as setting `afterSignInUrl` and `afterSignUpUrl` to the same value. |
146+
| `redirectUrl` (deprecated) | `string` | Full URL or path to navigate after successful sign in or sign up. This is the same as setting `afterSignInUrl` and `afterSignUpUrl` to the same value. **`signInFallbackRedirectUrl` has priority over the legacy `redirectUrl`. Use `fallbackRedirectUrl` or `forceRedirectUrl` instead of `redirectUrl`.** |
147147
| `secondFactorUrl` | `string` | Full URL or path to navigate during sign in, if 2FA is enabled. |

docs/components/unstyled/sign-in-button.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ The `<SignInButton>` component is a button that links to the sign-in page or dis
1111

1212
| Name | Type | Description |
1313
| --- | --- | --- |
14-
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
15-
| `signInForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs in. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
14+
| `forceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs in. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
15+
| `signUpForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs up. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
16+
| `fallbackRedirectUrl?` | `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
17+
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
1618
| `mode?` | `'redirect' \| 'modal'` | Determines what happens when a user clicks on the `<SignInButton>`. Setting this to `'redirect'` will redirect the user to the sign-in route. Setting this to `'modal'` will open a modal on the current route.<br />Defaults to `'redirect'`. |
1719
| `children?` | `React.ReactNode` | Children you want to wrap the `<SignInButton>` in. |
1820

docs/components/unstyled/sign-out-button.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The `<SignOutButton>` component is a button that signs a user out. By default, i
1111

1212
| Name | Type | Description |
1313
| --- | --- | --- |
14-
| `signOutCallback?` | `() => (void \| Promise<any>)` | A promise to handle after the sign out has successfully happened. |
14+
| `redirectUrl?` | `string` | The redirect URL to navigate to after sign out is complete. |
1515
| `signOutOptions?` | [`SignOutOptions`](#sign-out-options) | Options for signing out. Includes `sessionId` which if passed, signs the user out of a specific session. Useful for multi-session applications. |
1616
| `children?` | `React.ReactNode` | Children you want to wrap the `<SignOutButton>` in. |
1717

@@ -22,6 +22,7 @@ The type of the `signOutOptions` prop for the `<SignOutButton>` component is def
2222
| Name | Type | Description |
2323
| --- | --- | --- |
2424
| `sessionId?` | `string` | The ID of a specific session to sign out of. Useful for multi-session applications. |
25+
| `redirectUrl?` | `string` | The redirect URL to navigate to after sign out is complete. |
2526

2627
## How to use the `<SignOutButton>` component
2728

docs/components/unstyled/sign-up-button.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ The `<SignUpButton>` component is a button that links to the sign-up page or dis
1111

1212
| Name | Type | Description |
1313
| --- | --- | --- |
14-
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
15-
| `signUpForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs up. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
14+
| `forceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs up. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
15+
| `fallbackRedirectUrl?` | `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
16+
| `signInForceRedirectUrl?` | `string` | If provided, this URL will always be redirected to after the user signs in. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
17+
| `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](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
1618
| `mode?` | `'redirect' \| 'modal'` | Determines what happens when a user clicks on the `<SignUpButton>`. Setting this to `'redirect'` will redirect the user to the sign-up route. Setting this to `'modal'` will open a modal on the current route.<br />Defaults to `'redirect'` |
1719
| `children?` | `React.ReactNode` | Children you want to wrap the `<SignUpButton>` in. |
1820

0 commit comments

Comments
 (0)