-
Notifications
You must be signed in to change notification settings - Fork 143
Conversation
SamHoque
commented
Apr 10, 2025
Hey, Thank you for PR. as someone who has implemented better auth using JStack.
const sql = neon(process.env.DATABASE_URL!);
This will not work for cloudflare workers, due to process.env being undefined.
You need to create the auth as a hono middleware and use the db from the middleware, since it binds the env variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be done via a jstack middleware as well. using use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I realized this after reviewing the https://www.better-auth.com/docs/integrations/hono yesterday. Give me a day. I will do the fixes. Also, the env ones.
Thanks for taking the time to review tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image imageYes! I realized this after reviewing the https://www.better-auth.com/docs/integrations/hono yesterday. Give me a day. I will do the fixes. Also, the
envones.Thanks for taking the time to review tho
Hopefully this helps, I already implemented this for our company 2 months ago, publishing the code so it helps you. Good luck brother
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for sharing this. We'll implement this tomorrow after college
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eager to see your implementation! the jstack cli def need a proper better-auth setup on launch
yansircc
commented
May 3, 2025
Any update on this PR? Better-auth or next-auth integration would be a very good implement!
harshsbhat
commented
May 3, 2025
@yansircc Yes, I can work on this today or tomorrow ( since it's a weekend )
yansircc
commented
May 3, 2025
@harshsbhat You have no idea how much time I spent on auth, and in the end, I had to use Clerk's JWT solution.
ziyadev
commented
Sep 24, 2025
@harshsbhat still you working on this? If not, may i handle it ?
harshsbhat
commented
Sep 25, 2025
@ziyadev go for it
No description provided.