middleware, clerk auth, nextjs

I'm using a combination of NextJs, Hono and aiming to deploy this on Cloudflare Pages. My scenaro is I'm making a call to Hono, we should first check the auth in the middleware via clerk, which needs some env variables that I've declared in secrets and wrangler, but in the middleware of Pages Functions, the env variables aren't set yet (reference: https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/#top-level-getrequestcontext). Is there a workaround for this? I eventually need to authenticate the request and get the userId from Clerk.
Cloudflare Docs
Full-stack deployment · Cloudflare Pages docs
Deploy a full-stack Next.js site (recommended).
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server