Alwurts
Alwurts
BABetter Auth
Created by Alwurts on 3/3/2025 in #help
Auth setup for a mono repo with 2 projects
I have a mono repo that has 2 projects: - App project built with Next.js that has better-auth with drizzle and organizations configured and is where I do all my user management - Server project built with hono.js offers an API for the app which needs authentication. Currently here I'm not using better-auth directly, instead I get the session cookie manually and query the DB for the session in order to authenticate calls. What would be a good way to also use the better-auth api in my server for auth? Do I need to duplicate my auth config in my server or is there a way to import the api client from my app project into my server project? Thanks in advance for any recommendations
2 replies