From b677e3fd747f8d5c3af492430e74ce81a123e244 Mon Sep 17 00:00:00 2001 From: BilalG1 Date: Fri, 17 Oct 2025 10:29:35 -0700 Subject: [PATCH] fix bad docs (#953) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## High-level PR Summary This PR fixes a documentation error in the Convex integration guide by correcting two incorrect references from `stackServerApp` to `stackClientApp` for the `getConvexClientAuth()` method calls in browser and React environments. The HTTP client example correctly remains using `stackClientApp` as it was already accurate. ⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion | Order | File Path | |-------|-----------| | 1 | `docs/templates/others/convex.mdx` |
[![Need help? Join our Discord](https://img.shields.io/badge/Need%20help%3F%20Join%20our%20Discord-5865F2?style=plastic&logo=discord&logoColor=white)](https://discord.gg/n3SsVDAW6U) [![Analyze latest changes](https://img.shields.io/badge/Analyze%20latest%20changes-238636?style=plastic)](https://squash-322339097191.europe-west3.run.app/interactive/dd9214fd6fb6f812550934a9e4209272eea97d93ce9b3b40be9fcb1009c337ff/?repo_owner=stack-auth&repo_name=stack-auth&pr_number=953) ---- > [!IMPORTANT] > Fixes incorrect method references in Convex integration docs to use `stackClientApp` for browser and React environments. > > - **Documentation**: > - Corrects method references in `convex.mdx` and `README.md` from `stackServerApp` to `stackClientApp` for `getConvexClientAuth()` in browser and React environments. > - Updates HTTP client example to use `stackClientApp.getConvexHttpClientAuth()` with `tokenStore` parameter. > - Adds a link to a full example on GitHub in `convex.mdx`. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral) for 2e9c3f0d1e39206aa7bd7ec43de67fb5a45fc21b. You can [customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this summary. It will automatically update as commits are pushed. ---- ## Summary by CodeRabbit - Documentation - Updated Convex authentication examples to use client-side setup for browser, React, and HTTP clients. - Revised example snippets and wording to reflect current client-oriented APIs for auth initialization. - Clarified how to supply a token store for HTTP usage and aligned examples with current best practices. --------- Co-authored-by: Konsti Wohlwend --- docs/templates/others/convex.mdx | 9 +++++---- .../template/src/integrations/convex/component/README.md | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/templates/others/convex.mdx b/docs/templates/others/convex.mdx index 28b88e8ec..8467f83a8 100644 --- a/docs/templates/others/convex.mdx +++ b/docs/templates/others/convex.mdx @@ -50,9 +50,9 @@ export default { Then, update your Convex client to use Stack Auth: ```ts -convexClient.setAuth(stackServerApp.getConvexClientAuth({})); // browser JS -convexReactClient.setAuth(stackServerApp.getConvexClientAuth({})); // React -convexHttpClient.setAuth(stackServerApp.getAuthForConvexHttpClient({ tokenStore: requestObject })); // HTTP, see Stack Auth docs for more information on tokenStore +convexClient.setAuth(stackClientApp.getConvexClientAuth({})); // browser JS +convexReactClient.setAuth(stackClientApp.getConvexClientAuth({})); // React +convexHttpClient.setAuth(stackClientApp.getConvexHttpClientAuth({ tokenStore: requestObject })); // HTTP, see Stack Auth docs for more information on tokenStore ``` ### 5) Done! @@ -77,4 +77,5 @@ export const myQuery = query({ }); ``` -For more information on how to use Stack Auth, see the [Stack Auth docs](https://docs.stack-auth.com). +You can find the full example [here on GitHub](https://github.com/stack-auth/convex-next-template). + diff --git a/packages/template/src/integrations/convex/component/README.md b/packages/template/src/integrations/convex/component/README.md index c0340f9ff..9b2892099 100644 --- a/packages/template/src/integrations/convex/component/README.md +++ b/packages/template/src/integrations/convex/component/README.md @@ -31,9 +31,9 @@ export default { Then, update your Convex client to use Stack Auth: ```ts -convexClient.setAuth(stackServerApp.getConvexClientAuth()); // browser JS -convexReactClient.setAuth(stackServerApp.getConvexClientAuth()); // React -convexHttpClient.setAuth(stackServerApp.getAuthForConvexHttpClient({ tokenStore: requestObject })); // HTTP, see Stack Auth docs for more information on tokenStore +convexClient.setAuth(stackClientApp.getConvexClientAuth({})); // browser JS +convexReactClient.setAuth(stackClientApp.getConvexClientAuth({})); // React +convexHttpClient.setAuth(stackClientApp.getConvexHttpClientAuth({ tokenStore: requestObject })); // HTTP, see Stack Auth docs for more information on tokenStore ``` Now, you'll be able to access Stack Auth's functionality from your frontend & backend: