Skip to content

Conversation

@harshsbhat
Copy link

No description provided.

@harshsbhat harshsbhat marked this pull request as ready for review April 8, 2025 04:49
@SamHoque
Copy link

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.

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

Copy link
Author

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

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

image image

Hopefully this helps, I already implemented this for our company 2 months ago, publishing the code so it helps you. Good luck brother

Copy link
Author

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

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
Copy link

yansircc commented May 3, 2025

Any update on this PR? Better-auth or next-auth integration would be a very good implement!

@harshsbhat
Copy link
Author

@yansircc Yes, I can work on this today or tomorrow ( since it's a weekend )

@yansircc
Copy link

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
Copy link

ziyadev commented Sep 24, 2025

@harshsbhat still you working on this? If not, may i handle it ?

@harshsbhat
Copy link
Author

@ziyadev go for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants