diff --git a/docs/backend-requests/handling/nodejs.mdx b/docs/backend-requests/handling/nodejs.mdx index a9232fc35a..525db3aa2b 100644 --- a/docs/backend-requests/handling/nodejs.mdx +++ b/docs/backend-requests/handling/nodejs.mdx @@ -15,7 +15,7 @@ The Clerk Node SDK offers two authentication middlewares specifically for [Expre ```js - import "dotenv/config"; // To read CLERK_API_KEY + import "dotenv/config"; // To read CLERK_SECRET_KEY import { ClerkExpressWithAuth } from "@clerk/clerk-sdk-node"; import express from "express"; @@ -39,7 +39,7 @@ app.listen(port, () => { ``` ```typescript - import "dotenv/config"; // To read CLERK_API_KEY + import "dotenv/config"; // To read CLERK_SECRET_KEY import { ClerkExpressWithAuth, LooseAuthProp, @@ -85,7 +85,7 @@ app.listen(port, () => { ```js - import "dotenv/config"; // To read CLERK_API_KEY + import "dotenv/config"; // To read CLERK_SECRET_KEY import { ClerkExpressRequireAuth } from '@clerk/clerk-sdk-node'; import express from 'express'; @@ -114,7 +114,7 @@ app.listen(port, () => { ``` ```typescript - import "dotenv/config"; // To read CLERK_API_KEY + import "dotenv/config"; // To read CLERK_SECRET_KEY import { ClerkExpressRequireAuth, RequireAuthProp, diff --git a/docs/components/clerk-provider.mdx b/docs/components/clerk-provider.mdx index d8ae532045..caef4d0951 100644 --- a/docs/components/clerk-provider.mdx +++ b/docs/components/clerk-provider.mdx @@ -15,12 +15,7 @@ The `` component must be added to your React entrypoint. The `` component needs to access headers to authenticate correctly. This means anything wrapped by the provider will be opted into dynamic rendering at request time. If you have static-optimized or ISR pages that you would prefer not to be opted into dynamic rendering, make sure they are not wrapped by ``. - This is easiest to accomplish by ensuring that `` is added further down the tree to wrap route groups that explicitly need authentication instead of having the provider wrap your application root as recommended above. For example, if your project includes a set of landing/marketing pages as well as a dashboard that requires sign-in, you would create separate (marketing) and (dashboard) route groups. Adding `` to the (dashboard)/layout.jsx layout file will ensure that only those routes are opted into dynamic rendering, allowing the marketing routes to be statically optimized. - - - - The root layout is a server component. If you plan to use the `` outside the root layout, it will need to be a server component as well. - + This is easiest to accomplish by ensuring that `` is added further down the tree to wrap route groups that explicitly need authentication instead of having the provider wrap your application root as recommended above. For example, if your project includes a set of landing/marketing pages as well as a dashboard that requires login, you would create separate (marketing) and (dashboard) route groups. Adding `` to the `(dashboard)/layout.jsx` layout file will ensure that only those routes are opted into dynamic rendering, allowing the marketing routes to be statically optimized. @@ -53,7 +48,7 @@ The `` component must be added to your React entrypoint. function MyApp({ Component, pageProps }: AppProps) { return ( - + ); } @@ -94,9 +89,9 @@ The `` component must be added to your React entrypoint. | Name | Type | Description | | ------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `publishableKey` | `string` | Clerk publishable key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. | -| `frontendApi` | `string` | The frontend API host for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page under the **Advanced** section. | -| `navigate?` | `(to: string) => Promise \| void` | A function which takes the destination path as an argument and performs a "push" navigation. | +| `publishableKey` | `string` | The Clerk publishable key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. | +| `routerPush?` | `(to: string) => Promise \| void` | A function which takes the destination path as an argument and performs a "push" navigation. | +| `routerReplace?` | `(to: string) => Promise \| void` | A function which takes the destination path as an argument and performs a "replace" navigation. | | `clerkJSUrl?` | `string` | Define the URL that `@clerk/clerk-react` should hot-load `@clerk/clerk-js` from. | | `clerkJSVariant?` | `string` | If your web application only uses Control components, you can set this value to `headless` and load a minimal ClerkJS bundle for optimal page performance. | | `clerkJSVersion?` | `string` | Define the npm version for `@clerk/clerk-js`. | diff --git a/docs/manifest.json b/docs/manifest.json index d399f41da7..76190b4547 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -745,8 +745,8 @@ "/references/backend/organization/get-organization-membership-list" ], [ - "getPendingOrganizationInvitationList()", - "/references/backend/organization/get-pending-organization-invitation-list" + "getOrganizationInvitationList()", + "/references/backend/organization/get-organization-invitation-list" ], [ "createOrganization()", diff --git a/docs/organizations/updating-organizations.mdx b/docs/organizations/updating-organizations.mdx index d1839cd350..4e51fc0ff7 100644 --- a/docs/organizations/updating-organizations.mdx +++ b/docs/organizations/updating-organizations.mdx @@ -135,7 +135,7 @@ export default function EditOrganization({ organizationId }) { async function init() { // This is the current organization ID. const organizationId = "org_XXXXXXX"; - const organizationMemberships = await window.Clerk.getOrganizationMemberships() + const organizationMemberships = await window.Clerk.user.getOrganizationMemberships() const currentMembership = organizationMemberships.find(membership => membership.organization.id === organizationId); const currentOrganization = currentMembership.organization; diff --git a/docs/organizations/viewing-memberships.mdx b/docs/organizations/viewing-memberships.mdx index 30a5414593..39b8eeaa6b 100644 --- a/docs/organizations/viewing-memberships.mdx +++ b/docs/organizations/viewing-memberships.mdx @@ -7,7 +7,7 @@ description: Learn how to view organization memberships for the currently signed Clerk provides the ability for the currently signed-in user to view all the organizations they are members of. -In React and Next.js applications, the [`useOrganizationList()`](/docs/references/react/use-organization-list) hook can be used to return the list of invitations or memberships for the currently active user. In JavaScript applications, the [`getOrganizationMemberships()`](/docs/references/javascript/clerk/organization-methods#get-organization-memberships) method is used to retrieve the list of organizations the current user is a part of and can be accessed through the [`Clerk` object](/docs/references/javascript/clerk/clerk). +In React and Next.js applications, the [`useOrganizationList()`](/docs/references/react/use-organization-list) hook can be used to return the list of invitations or memberships for the currently active user. In JavaScript applications, the [`getOrganizationMemberships()`](/docs/references/javascript/user/user#get-organization-memberships) method is used to retrieve the list of organizations the current user is a part of and can be accessed through the [`User` object](/docs/references/javascript/user/user). {/* TODO (DOCS-316): Add a section about viewing all memberships for an organization. @@ -17,7 +17,7 @@ You can use the `getOrganizationMembershipList()` method to retrieve a list of m ## Usage -{/* TODO (DOCS-316): Update and validate these code examples. */} +{/* TODO (DOCS-316): Update and validate these code examples. Should have Nextjs App Router and JavaScript only. */} ```tsx filename="pages/joined-organizations.tsx" @@ -112,7 +112,7 @@ export default JoinedOrganizationList;