SkyguyS
Convex Community5mo ago
7 replies
Skyguy

Server-side token forwarding for AuthKit + Convex in Next.js

I’m using
@workos-inc/authkit-nextjs
middleware (now called proxy) with Convex in a Next.js App Router project.
On the client side, everything works
ctx.auth.getUserIdentity()
returns a user after login.
My question: Does AuthKit middleware automatically forward the session token for server-side calls to
fetchQuery
/
preloadQuery
, or do I need to pass
{ token }
every time manually?
I saw the changelog stating "No extra wiring or token exchange needed.", but I'm gueesing that's meant for client-side functions?
Anyway, I can’t find clear docs about usage in server components and routing.
Thanks in advance for any clarification!
Was this page helpful?