stu
Explore posts from serversBABetter Auth
•Created by Abdi on 4/4/2025 in #help
Cloudflare Worker exceeded CPU time limit, while sign-up/email.
Thanks for the response, I'll give this a try.
Just to clarify, where are you putting the
origin
param? When initializing betterAuth
, I see a trustedOrigins
param? Are you referring to that?12 replies
BABetter Auth
•Created by SheldonFromBBT on 2/26/2025 in #help
(Cloudflare) Workers CPU resources exceeded
I'm actually running on a Cloudflare business account, and still get the error.
10 replies
BABetter Auth
•Created by SheldonFromBBT on 2/26/2025 in #help
(Cloudflare) Workers CPU resources exceeded
Hey @SheldonFromBBT , were you able to find a fix for this? I'm running into the same thing ATM.
10 replies
BABetter Auth
•Created by Abdi on 4/4/2025 in #help
Cloudflare Worker exceeded CPU time limit, while sign-up/email.
@Abdi @Ping I have a Cloudflare business plan, and still encounter this issue.
For reference regarding CPU limits in workers: https://developers.cloudflare.com/workers/platform/limits/#cpu-time
No idea why Better-Auth would be hitting these limits, they're generous enough for basic stuff like a DB query to gather user info.
12 replies
BABetter Auth
•Created by bitangel84 on 4/16/2025 in #help
Drizzle + PG + Hyperdrive + Cloudflare Workers doesn't work
How's better-auth running on D1?
I'm using it with a normal Postgres connection, but when I sign in, I frequently get an error like
exceeding worker CPU
or something like that. What did you end up going with?24 replies
BABetter Auth
•Created by bitangel84 on 4/16/2025 in #help
Drizzle + PG + Hyperdrive + Cloudflare Workers doesn't work
Could you get Better Auth working with a Hyperdrive connection?
Been struggling with it for a while, and gave up. I'm using Postgres, and using the postgres connection string rather than the hyperdrive connection string ended up working for me, but it's not ideal.
24 replies
CDCloudflare Developers
•Created by stu on 4/13/2025 in #general-help
Hostname 'www.<my-domain>.com' already has externally managed DNS records
Following up on this, I deleted my A records and CNAME for www.
Then deployed with the route pattern
"<my-domain>.com"
. This worked. I'd like to redirect everything to www, but can't seem to get it working correctly.2 replies
CDCloudflare Developers
•Created by JacobMGEvans on 4/13/2025 in #wrangler
Do you already have a Record (CNAME or A
Maybe those rules I previously setup are interfering with the wrangler routes
6 replies
CDCloudflare Developers
•Created by JacobMGEvans on 4/13/2025 in #wrangler
Do you already have a Record (CNAME or A
Regarding the www, there is a "Rules" section where I added two template rules. One
Redirect from HTTP to HTTPS [Template] URI Full wildcard r"http://*" 301 redirect
and Redirect from Root to WWW [Template] URI Full wildcard r"https://<my-domain>.com/*" 301 redirect
.
And it seems like when I navigate to the DNS area, it has like
6 replies
CDCloudflare Developers
•Created by JacobMGEvans on 4/13/2025 in #wrangler
Do you already have a Record (CNAME or A

6 replies
BABetter Auth
•Created by stu on 4/13/2025 in #help
Hanging timeout server-side requests using Cloudflare Hyperdrive
it's form data. It's a FormDataEntryValue type, and adding
toString()
turns the value to a string. Will update the code excerpt. I don't think it's an issue there, as this functionality works when I use a regular postgres connectionString, but hangs forever when I use a Hyperdrive connectionString.7 replies
BABetter Auth
•Created by dimsumham on 4/3/2025 in #help
cloudflare error
Amazing, thanks. Yes, the hyperdrive connection string has
postgresql://
at the beginning.
It's working in other instances, for example to fetch data.
But it's getting stuck specifically with better-auth requests I think.30 replies
BABetter Auth
•Created by dimsumham on 4/3/2025 in #help
cloudflare error
hey @dimsumham, was curious if you had success using Cloudflare + Hyperdrive + better-auth?
Basically, I have sign-in functionality server-side like:
But it's hanging forever when I hit it. No logs, just forever loading.
Auth looks like:
And getDb function looks like:
Any ideas the changes I should make?
30 replies
CDCloudflare Developers
•Created by Emilio on 4/10/2025 in #hyperdrive
If you were able to create the
If I replace the hyperdrive connection string with the DB connection string in my code, it works and logs come through.
3 replies
CDCloudflare Developers
•Created by Emilio on 4/10/2025 in #hyperdrive
If you were able to create the
Hey @Emilio thanks for the response.
That's good to know. I'm trying to query it in my code, and it just hangs and never returns anything. I'm trying to tail the logs for the worker, and not getting any messages. Any suggestions on how to debug this?
3 replies
BABetter Auth
•Created by dimsumham on 4/3/2025 in #help
cloudflare error
Nice, I'm new to Cloudflare, so just trying to get things working. I'll look into Hyperdrive, sounds like a good fit for using Postgres with Cloudflare.
30 replies
BABetter Auth
•Created by dimsumham on 4/3/2025 in #help
cloudflare error
Hey @dimsumham I'm getting the same error. Did you find any clean way to resolve, or should I wrap auth in a function? I'm also using postgres.
30 replies
BABetter Auth
•Created by stu on 4/2/2025 in #help
Invalid token on resetPassword
Thanks for the response, I'm not fully following the flow here.
Let's say the token generated and in sendResetPassword is ABC.
The URL generated is
/reset-password/ABC?callbackURL=/dashboard
(maybe my use of callbackURL is incorrect?).
By clicking this link the email, it navigates to https://localhost:4321/reset-password/ABC?callbackURL=/dashboard
, where I have a form to set a new password.
When submitting the form, we parse the token ABC. And then, for testing, checking , which is finding a row with the correct user.
But then passing this same token to resetPassword, I'm getting an INVALID_TOKEN
error.17 replies