© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•9mo ago•
1 reply
mrk

API Request errors for better-auth on Cloudflare Workers

Hey! Has someone gotten
better-auth
better-auth
to work on cloudflare workers? I am trying to deploy a Nuxt 4 application (via NuxtHub) to cloudflare workers, deployment works, but
better-auth
better-auth
fails on requests to API endpoints, despite it working flawlessly in development, so this must be cloudflare-specific issue. I consistently get:

CLIENT ERROR:
POST https://app.netzo.dev/api/auth/sign-up/email 500 (Internal Server Error)
POST https://app.netzo.dev/api/auth/sign-up/email 500 (Internal Server Error)


SERVER ERROR:
SERVER_ERROR: TypeError: Cannot read properties of undefined (reading 'includes')
SERVER_ERROR: TypeError: Cannot read properties of undefined (reading 'includes')


I am using
better-auth-nuxt
better-auth-nuxt
, I feel this might be related to missing ENV VARS in production, can anyone share any insight? I've tried everything which comes to mind already to no avail.

I am setting
DATABASE_URL
DATABASE_URL
to Supabase's direct connection string, which worked previously when deploying to Cloudflare Pages, but same deployment to Cloudflare Workers (via
nuxt
nuxt
/
nitro
nitro
preset
cloudflare-durable
cloudflare-durable
is failing despite the env variable being properly set in the cloudflare console.
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

extensive API on cloudflare Workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
Clarification on Cloudflare Workers Request Limits
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
10mo ago
Cloudflare Workers Request Count
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago