auth in distributed system
i wanted to build a distributed system with a standalone auth server that is used by both my hono api and nextjs frontend, since im using a monorepo my plan is to create a shared auth package with auth server and client instances, then create a separate hono server that uses the auth server instance for handling requests, and then the same auth client and server instances can be used in my api and frontend
wanted to know if this is a good mental map or there would be some better apporaches to this
4 Replies
It's a good structure
You can take a look at https://github.com/t3-oss/create-t3-turbo/
GitHub
GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo usin...
Clean and simple starter repo using the T3 Stack along with Expo React Native - t3-oss/create-t3-turbo
holyyy shitt when did this come out?
here’s how i did it
https://github.com/777advait/better-auth-monorepo
GitHub
GitHub - 777advait/better-auth-monorepo
Contribute to 777advait/better-auth-monorepo development by creating an account on GitHub.