too_easy
too_easy4w ago

ConvexAuthNextjsServerProvider not exported

From the docs for NextJS (https://labs.convex.dev/auth/setup): Wrap your app in ConvexAuthNextjsServerProvider from @convex-dev/auth/nextjs/server But ConvexAuthNextjsServerProvider is not exported from @convex/auth package in v0.0.74. Means that a bunch of the NextJS steps including, I presume, middleware are not achievable as the docs say?
8 Replies
Convex Bot
Convex Bot4w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Clever Tagline
Not sure if this is a typo in your post, but you said that the provider isn't in @convex/auth. The docs mention@convex-dev/auth, which is different. I ran a quick test with the import using @convex-dev/auth, and that provider is there.
edproton
edproton4w ago
@Clever Tagline (wrong message)
Clever Tagline
Sorry, but this is getting into unfamiliar territory. I'm not a NextJS guy. I only spotted the earlier problem because it was a simple typo. Hoping that someone else who uses NextJS with Convex can take it from here.
edproton
edproton4w ago
sorry to bother you @Clever Tagline . Wrong message haha.
Kenni
Kenni3w ago
import { ConvexAuthNextjsServerProvider } from "@convex-dev/auth/nextjs/server"; <ConvexAuthNextjsServerProvider>
<ConvexClientProvider>
{children} </ConvexClientProvider> </ConvexAuthNextjsServerProvider> "@convex-dev/auth": "^0.0.74",
ralphdas
ralphdas3w ago
This puzzled me as well. I manage to find out that the installed version in my package.json was ^0.0.47 at that moment this functionality was deemed alpha . Bumping up to ^0.0.75 did the trick for me. Not sure if this was a NPM caching issue or caused by the auth scripts I ran before: npx @convex-dev/auth
ian
ian2w ago
run npx @convex-dev/auth@latest to run the latest version I believe

Did you find this page helpful?