Next JS server Component fetch data when using clerk for authentication and Hono js For backend #4271
Closed
Answered
by
mehdad-hussain
mehdad-hussain
asked this question in
Support request - DO NOT OPEN HERE
|
I am using next JS server component to fetch data with search params using clerk authentication package. Also, using hono JS as backend with drizzle ORM. The issue is can't fetch data in server component as clerk does not sending auth session or token in from server component when doing it on it's own for client component. console in terminal: backend code: facing error: can fetch data if I remove clerkMiddleware(), and userId check Why could not doing same in server component !!! help pls. |
Answered by
mehdad-hussain
Oct 3, 2024
Replies: 1 comment
|
Okay after go through hono RPC guides I get the solution I have to send headers in another object like bellow : or I can directly use fetch also |
0 replies
Answer selected by
mehdad-hussain
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay after go through hono RPC guides I get the solution I have to send headers in another object like bellow :
or I can directly use fetch also