Skip to content

Commit

Permalink
fix up broken links due to mov script missing links with hashes in them
Browse files Browse the repository at this point in the history
  • Loading branch information
NWylynko committed Jan 9, 2025
1 parent 3b017e6 commit 5503d69
Show file tree
Hide file tree
Showing 45 changed files with 72 additions and 72 deletions.
2 changes: 1 addition & 1 deletion docs/advanced-usage/satellite-domains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ To access authentication state from a satellite domain, users will be transparen
<Tabs items={["Next.js", "Remix"]}>
<Tab>
In a Next.js application, you must set the properties in the [`<ClerkProvider>`](/docs/components/clerk-provider) component _and_ in your [`clerkMiddleware()`](/docs/references/nextjs/clerk-middleware#clerk-middleware).
In a Next.js application, you must set the properties in the [`<ClerkProvider>`](/docs/components/clerk-provider) component _and_ in your [`clerkMiddleware()`](/docs/sdk/nextjs/clerk-middleware#clerk-middleware).

- In the Next project associated with your primary domain, only the `signInUrl` prop needs to be configured as shown in the following example:

Expand Down
2 changes: 1 addition & 1 deletion docs/authentication/enterprise-connections/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Clerk prevents users linked to deprovisioned accounts in the OpenID provider fro

Within 10 minutes of a user being removed from the OpenID provider (e.g. [suspendeded](https://support.google.com/a/answer/33312?hl=en) or [deleted](https://support.google.com/a/answer/33314?hl=en) via Google Workspace, or [deleted](https://learn.microsoft.com/en-us/entra/fundamentals/how-to-create-delete-users#delete-a-user) via Microsoft Entra), Clerk will recognize that the user has been deprovisioned and will revoke that user's existing sessions.

It is ultimately the app's responsibility to handle this unauthenticated state and display something appropriate to the user. For example, Next.js apps using [`auth.protect()`](/docs/references/nextjs/auth#auth-protect) will automatically redirect the user to the sign-in page.
It is ultimately the app's responsibility to handle this unauthenticated state and display something appropriate to the user. For example, Next.js apps using [`auth.protect()`](/docs/sdk/nextjs/auth#auth-protect) will automatically redirect the user to the sign-in page.

### SAML vs. EASIE

Expand Down
2 changes: 1 addition & 1 deletion docs/components/clerk-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The recommended approach is to wrap your entire app with `<ClerkProvider>` at th
{/* TODO: Make dedicated docs pages for these meta-frameworks */}

> [!NOTE]
> Other meta-frameworks, like [Remix](/docs/quickstarts/remix#configure-clerk-app), have wrappers around `<ClerkProvider>` to make their integrations tighter.
> Other meta-frameworks, like [Remix](/docs/sdk/remix/quickstart#configure-clerk-app), have wrappers around `<ClerkProvider>` to make their integrations tighter.
## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/deployments/clerk-environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The following environment variables enable you to configure API and SDK behavior
| `NEXT_PUBLIC_CLERK_API_VERSION` | Sets the version of the Clerk API to use. Defaults to `"v1"` |
| `NEXT_PUBLIC_CLERK_FAPI` | Sets the URL to your Clerk app's Frontend API. |
| `NEXT_PUBLIC_CLERK_PROXY_URL` | Sets the URL for your proxy. |
| `CLERK_ENCRYPTION_KEY` | Sets the encryption key to securely propagate `clerkMiddleware` dynamic keys during request time. A 128-bit, pseudorandom value should be used. See [Dynamic keys](/docs/references/nextjs/clerk-middleware#dynamic-keys) to learn more. |
| `CLERK_ENCRYPTION_KEY` | Sets the encryption key to securely propagate `clerkMiddleware` dynamic keys during request time. A 128-bit, pseudorandom value should be used. See [Dynamic keys](/docs/sdk/nextjs/clerk-middleware#dynamic-keys) to learn more. |
| `CLERK_JWT_KEY` | Sets the JWT verification key that Clerk will use to provide networkless JWT session token verification. Refer to [Manual JWT verification](/docs/backend-requests/handling/manual-jwt). |
</Tab>
</Tabs>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/architecture-scenarios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Clerk offers a number of building blocks to help integrate organizations into yo

- The [`<OrganizationSwitcher />` component](/docs/components/organization/organization-switcher) provides a way for your users to select which organization is active. The [`useOrganizationList()` hook](/docs/organizations/custom-organization-switcher) can be used for more control.
- The [`useOrganization()` hook](/docs/sdk/react/use-organization) can be used to fetch the current, active organization.
- The [`<Protect>` component](/docs/components/protect) enables you to limit who can view certain pages based on their role. Additionally, Clerk exposes a number of helper functions, such as [`auth()`](/docs/sdk/nextjs/auth), and hooks, such as [`useAuth()`](/docs/references/react/use-auth#how-to-use-the-use-auth-hook), to check the user's authorization throughout your app and API endpoints.
- The [`<Protect>` component](/docs/components/protect) enables you to limit who can view certain pages based on their role. Additionally, Clerk exposes a number of helper functions, such as [`auth()`](/docs/sdk/nextjs/auth), and hooks, such as [`useAuth()`](/docs/sdk/react/use-auth#how-to-use-the-use-auth-hook), to check the user's authorization throughout your app and API endpoints.

The organization's ID should be stored in your database alongside each resource so that it can be used to filter and query the resources that should be rendered or returned according to the active organization.

Expand Down
6 changes: 3 additions & 3 deletions docs/guides/authjs-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This guide shows how to migrate an application using Auth.js (formerly NextAuth.
<Steps>
## Install `@clerk/nextjs`

Clerk's Next.js SDK gives you access to prebuilt [components](/docs/components/overview), [hooks](/docs/references/nextjs/overview#client-side-helpers), and [helpers](/docs/sdk/nextjs/methods) for Next.js Server Components, Route Handlers and Middleware. Run the following command to install it:
Clerk's Next.js SDK gives you access to prebuilt [components](/docs/components/overview), [hooks](/docs/sdk/nextjs/methods#client-side-helpers), and [helpers](/docs/sdk/nextjs/methods) for Next.js Server Components, Route Handlers and Middleware. Run the following command to install it:

<CodeBlockTabs options={["npm", "yarn", "pnpm"]}>
```bash {{ filename: 'terminal' }}
Expand Down Expand Up @@ -176,7 +176,7 @@ This guide shows how to migrate an application using Auth.js (formerly NextAuth.

<Tabs items={["App Router", "Pages Router"]}>
<Tab>
You can replace Auth.js's `setServerSession()` with Clerk's [`auth()`](/docs/references/nextjs/auth#auth) helper in order to read your user data.
You can replace Auth.js's `setServerSession()` with Clerk's [`auth()`](/docs/sdk/nextjs/auth#auth) helper in order to read your user data.

```tsx {{ filename: 'app/page.tsx' }}
import { auth, currentUser } from '@clerk/nextjs/server'
Expand All @@ -191,7 +191,7 @@ This guide shows how to migrate an application using Auth.js (formerly NextAuth.
</Tab>

<Tab>
You can replace Auth.js's `setServerSession()` with Clerk's [`getAuth()`](/docs/references/nextjs/get-auth#get-auth) helper in order to read your user data.
You can replace Auth.js's `setServerSession()` with Clerk's [`getAuth()`](/docs/sdk/nextjs/get-auth#get-auth) helper in order to read your user data.

```tsx {{ filename: 'pages/index.tsx' }}
export async function getServerSideProps(context) {
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/custom-redirects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ If you would like to override the `redirect_url` value and supply a custom redir

## Middleware

If you are using Next.js and want a more programmatically generated redirect option, you can use the [`auth.protect()`](/docs/references/nextjs/auth#protect) method in your [Clerk middleware](/docs/sdk/nextjs/clerk-middleware).
If you are using Next.js and want a more programmatically generated redirect option, you can use the [`auth.protect()`](/docs/sdk/nextjs/auth#protect) method in your [Clerk middleware](/docs/sdk/nextjs/clerk-middleware).

```tsx {{ filename: 'middleware.ts' }}
import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/waitlist.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ In [**Waitlist** mode](/docs/authentication/configuration/restrictions#waitlist)

### Add `clerkMiddleware()` to your app

[`clerkMiddleware()`](/docs/references/nextjs/clerk-middleware#clerk-middleware) grants you access to user authentication state throughout your app, on any route or page. It also allows you to protect specific routes from unauthenticated users. To add `clerkMiddleware()` to your app, follow these steps:
[`clerkMiddleware()`](/docs/sdk/nextjs/clerk-middleware#clerk-middleware) grants you access to user authentication state throughout your app, on any route or page. It also allows you to protect specific routes from unauthenticated users. To add `clerkMiddleware()` to your app, follow these steps:

1. Create a `middleware.ts` file.

Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/databases/supabase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ For interacting with the Supabase dashboard, you can either use the **Supabase i
<Tab>
The following example uses the [Next.js SDK](/docs/sdk/nextjs/methods) to demonstrate how to integrate Supabase with Clerk in a **server-side rendered** application.

The `createClerkSupabaseClientSsr()` function is stored in a separate file so that it can be re-used in multiple places, such as within `page.tsx` or a Server Action file. This function uses the [`auth().getToken()`](/docs/references/nextjs/auth#use-auth-for-data-fetching) method to get the Clerk token and inject it into the request headers sent to Supabase.
The `createClerkSupabaseClientSsr()` function is stored in a separate file so that it can be re-used in multiple places, such as within `page.tsx` or a Server Action file. This function uses the [`auth().getToken()`](/docs/sdk/nextjs/auth#use-auth-for-data-fetching) method to get the Clerk token and inject it into the request headers sent to Supabase.

```ts {{ filename: 'src/app/ssr/client.ts' }}
import { auth } from '@clerk/nextjs/server'
Expand Down
2 changes: 1 addition & 1 deletion docs/organizations/org-slugs-in-urls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ This guide shows you how to add organization slugs to your app's URLs, configure
> [!TIP]
> If your app doesn't use `clerkMiddleware()`, or you prefer to manually set the active organization, use the [`setActive()`](/docs/references/javascript/clerk/session-methods) method to control the active organization on the client-side. See [this guide](/docs/guides/force-organizations#set-an-active-organization-based-on-the-url) to learn how to manually activate a specific organization based on the URL.
With [`clerkMiddleware()`](/docs/sdk/nextjs/clerk-middleware), you can use the [`organizationSyncOptions`](/docs/references/nextjs/clerk-middleware#organization-sync-options) property to declare URL patterns that determine whether a specific organization or user's personal account should be activated.
With [`clerkMiddleware()`](/docs/sdk/nextjs/clerk-middleware), you can use the [`organizationSyncOptions`](/docs/sdk/nextjs/clerk-middleware#organization-sync-options) property to declare URL patterns that determine whether a specific organization or user's personal account should be activated.

If the middleware detects one of these patterns in the URL and finds that a different organization is active in the session, it'll attempt to set the specified organization as the active one.

Expand Down
14 changes: 7 additions & 7 deletions docs/organizations/verify-user-permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Clerk enables two broad approaches to role and permissions-based authorization:

1. If you would like to immediately prevent unauthorized users from accessing content, you can:
- Use the [`<Protect>`](/docs/components/protect) component to prevent content from rendering if the active user is unauthorized.
- Call [`auth.protect()`](/docs/references/nextjs/auth#protect) to throw a `404` error if the active user is unauthorized.
- Call [`auth.protect()`](/docs/sdk/nextjs/auth#protect) to throw a `404` error if the active user is unauthorized.
1. If you would like more control over the response when a user is unauthorized, you can:
- Call the [`has()`](/docs/references/backend/types/auth-object#has) helper, which returns `false` if the active user lacks the role or permissions you're checking for. You can _choose_ how your app responds instead of immediately preventing content from rendering or throwing an error.

Expand Down Expand Up @@ -113,9 +113,9 @@ The following examples work for both SSR and CSR.

<Tab>
> [!WARNING]
> [`auth.protect()`](/docs/references/nextjs/auth#protect) is only available for App Router, and only works on the server-side.
> [`auth.protect()`](/docs/sdk/nextjs/auth#protect) is only available for App Router, and only works on the server-side.
The following example uses [`auth.protect()`](/docs/references/nextjs/auth#protect) to protect a RSC from unauthenticated and unauthorized access.
The following example uses [`auth.protect()`](/docs/sdk/nextjs/auth#protect) to protect a RSC from unauthenticated and unauthorized access.

- If the user is not authenticated, `auth.protect()` will redirect the user to the sign-in route.
- If the user is authenticated but is not authorized (as in, does not have the `org:team_settings:read` permission), `auth.protect()` will throw a `404` error.
Expand Down Expand Up @@ -206,9 +206,9 @@ The following examples work for both SSR and CSR.

<Tab>
> [!WARNING]
> [`auth.protect()`](/docs/references/nextjs/auth#protect) is only available for App Router, and only works on the server-side.
> [`auth.protect()`](/docs/sdk/nextjs/auth#protect) is only available for App Router, and only works on the server-side.
The following example uses [`auth.protect()`](/docs/references/nextjs/auth#protect) to protect a Next.js Route Handler from unauthenticated and unauthorized access.
The following example uses [`auth.protect()`](/docs/sdk/nextjs/auth#protect) to protect a Next.js Route Handler from unauthenticated and unauthorized access.

- If the user is not authenticated nor authorized (as in, does not have the `org:team_settings:manage` permission), `auth.protect()` will throw a `404` error.
- If the user is both authenticated and authorized, `auth.protect()` will return the user's `userId`.
Expand Down Expand Up @@ -339,9 +339,9 @@ You can pass a `role` the same way you can pass a `permission` in all the exampl

<Tab>
> [!WARNING]
> [`auth.protect()`](/docs/references/nextjs/auth#protect) is only available for App Router, and only works on the server-side.
> [`auth.protect()`](/docs/sdk/nextjs/auth#protect) is only available for App Router, and only works on the server-side.
The following example uses [`auth.protect()`](/docs/references/nextjs/auth#protect) to protect a RSC from unauthenticated and unauthorized access.
The following example uses [`auth.protect()`](/docs/sdk/nextjs/auth#protect) to protect a RSC from unauthenticated and unauthorized access.

- If the user is not authenticated, `auth.protect()` will redirect the user to the sign-in route.
- If the user is authenticated but is not authorized (as in, does not have the `org:admin` or `org:billing_manager` role), `auth.protect()` will throw a `404` error.
Expand Down
6 changes: 3 additions & 3 deletions docs/references/backend/types/auth-object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ The `Auth` object is available on the `request` object in server contexts. Some
| - | - |
| Next.js App Router | [`auth()`](/docs/sdk/nextjs/auth) |
| Next.js Pages Router | [`getAuth()`](/docs/sdk/nextjs/get-auth) |
| Astro | [`locals.auth()`](/docs/references/astro/locals#locals-auth) |
| Astro | [`locals.auth()`](/docs/sdk/astro/locals#locals-auth) |
| Express | [`req.auth`](/docs/sdk/express/methods) |
| React Router | [`getAuth()`](/docs/sdk/react-router/get-auth) |
| Remix | [`getAuth()`](/docs/references/remix/read-session-data#get-auth) |
| Remix | [`getAuth()`](/docs/sdk/remix/read-session-data#get-auth) |
| Tanstack Start | [`getAuth()`](/docs/sdk/tanstack-start/get-auth) |
| Other | `request.auth` |

Expand Down Expand Up @@ -253,7 +253,7 @@ type ServerGetTokenOptions = {

The `Auth` object is not available in the frontend. To use the `getToken()` method in the frontend:

- For React-based applications, you can use the `useAuth()` hook. See the [reference documentation](/docs/references/react/use-auth#how-to-use-the-use-auth-hook) for example usage.
- For React-based applications, you can use the `useAuth()` hook. See the [reference documentation](/docs/sdk/react/use-auth#how-to-use-the-use-auth-hook) for example usage.
- For JavaScript applications, see the [reference documentation](/docs/references/javascript/session#get-token) for example usage.

#### Use `getToken()` in the backend
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/astro/clerk-middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can protect routes by checking either or both of the following:

### Protect routes based on user authentication status

To protect routes based on user authentication status, use [`auth().userId`](/docs/references/nextjs/auth#retrieving-user-id){{ target: '_blank' }} to check if the `userId` is present. If it is not, the user is not authenticated, and you can redirect them to the sign-in page.
To protect routes based on user authentication status, use [`auth().userId`](/docs/sdk/nextjs/auth#retrieving-user-id){{ target: '_blank' }} to check if the `userId` is present. If it is not, the user is not authenticated, and you can redirect them to the sign-in page.

```tsx {{ filename: 'src/middleware.ts' }}
import { clerkMiddleware, createRouteMatcher } from '@clerk/astro/server'
Expand Down Expand Up @@ -97,4 +97,4 @@ export const onRequest = clerkMiddleware((auth, context) => {

## `clerkMiddleware()` options

The `clerkMiddleware()` function accepts an optional object. See the full list of options available [here](/docs/references/nextjs/clerk-middleware#clerk-middleware-options.){{ target: '_blank' }}
The `clerkMiddleware()` function accepts an optional object. See the full list of options available [here](/docs/sdk/nextjs/clerk-middleware#clerk-middleware-options.){{ target: '_blank' }}
2 changes: 1 addition & 1 deletion docs/sdk/astro/endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function GET({ locals }) {

## Retrieve the current user

In some cases, you might need the current user in your endpoint. Use the asynchronous [`currentUser()` local](/docs/references/astro/locals#accessing-the-current-user) to retrieve the current [`Backend User`](/docs/references/backend/types/backend-user){{ target: '_blank' }} object, as shown in the following example:
In some cases, you might need the current user in your endpoint. Use the asynchronous [`currentUser()` local](/docs/sdk/astro/locals#accessing-the-current-user) to retrieve the current [`Backend User`](/docs/references/backend/types/backend-user){{ target: '_blank' }} object, as shown in the following example:

```ts {{ filename: 'src/pages/api/route.ts' }}
export async function GET({ locals }) {
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/astro/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ The following references show how to integrate Clerk features into your Astro ap

The Astro SDK provides access to Clerk's authentication data through Astro's [`locals`](https://docs.astro.build/en/guides/middleware/#storing-data-in-contextlocals) object. The following references show how to access authentication data in server-side code:

- [Auth](/docs/references/astro/locals#auth)
- [CurrentUser](/docs/references/astro/locals#currentuser)
- [Auth](/docs/sdk/astro/locals#auth)
- [CurrentUser](/docs/sdk/astro/locals#currentuser)

#### `Auth` object

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/astro/migrating-from-astro-community-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import { SignInButton } from '@clerk/astro/components'

### Stores

Submodule `/stores` was replaced with `/client`. The following changes are required to import the [stores](/docs/references/astro/overview#client-side-helpers):
Submodule `/stores` was replaced with `/client`. The following changes are required to import the [stores](/docs/sdk/astro/methods#client-side-helpers):

```js {{ del: [1, 4, 5], ins: [2, 6, 7] }}
import { $clerk } from 'astro-clerk-auth/stores'
Expand Down
Loading

0 comments on commit 5503d69

Please sign in to comment.