Skip to content

Rename redirect and fallback url props #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/components/authentication/sign-in.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ All props are optional.
| `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. |
| `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`. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `initialValues` | [`SignInInitialValues`](/docs/references/javascript/types/sign-in-initial-values) | The values used to prefill the sign-in fields with. |

## Usage with frameworks
Expand Down
6 changes: 4 additions & 2 deletions docs/components/authentication/sign-up.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ All props are optional.
| `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. |
| `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`. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `initialValues` | [`SignUpInitialValues`](/docs/references/javascript/types/sign-up-initial-values) | The values used to prefill the sign-up fields with. |

## Usage with frameworks
Expand Down
4 changes: 2 additions & 2 deletions docs/components/clerk-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ The `<ClerkProvider>` component must be added to your React entrypoint.
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |

| `isSatellite?` | `boolean \| ((url: URL) => boolean)` | This option defines that the application is a satellite application. |
| `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. |
Expand Down
4 changes: 2 additions & 2 deletions docs/components/control/authenticate-with-callback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The `<AuthenticateWithRedirectCallback />` is used to complete a custom OAuth fl

| Name | Type | Description |
| --- | --- | --- |
| `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. |
| `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`.** |
| `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. |
| `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. |
| `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`.** |
| `secondFactorUrl` | `string` | Full URL or path to navigate during sign in, if 2FA is enabled. |
6 changes: 4 additions & 2 deletions docs/components/unstyled/sign-in-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ The `<SignInButton>` component is a button that links to the sign-in page or dis

| Name | Type | Description |
| --- | --- | --- |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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'`. |
| `children?` | `React.ReactNode` | Children you want to wrap the `<SignInButton>` in. |

Expand Down
3 changes: 2 additions & 1 deletion docs/components/unstyled/sign-out-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `<SignOutButton>` component is a button that signs a user out. By default, i

| Name | Type | Description |
| --- | --- | --- |
| `signOutCallback?` | `() => (void \| Promise<any>)` | A promise to handle after the sign out has successfully happened. |
| `redirectUrl?` | `string` | The redirect URL to navigate to after sign out is complete. |
| `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. |
| `children?` | `React.ReactNode` | Children you want to wrap the `<SignOutButton>` in. |

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

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

Expand Down
6 changes: 4 additions & 2 deletions docs/components/unstyled/sign-up-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ The `<SignUpButton>` component is a button that links to the sign-up page or dis

| Name | Type | Description |
| --- | --- | --- |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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. |
| `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'` |
| `children?` | `React.ReactNode` | Children you want to wrap the `<SignUpButton>` in. |

Expand Down
Loading
Loading