Auth service for a microservice

How would build auth service in a microservice using better-auth as the auth service for a the api getaway. I intend to use honojs. How would you go about this? Most services would be in go and grpc
Solution:
Yeah as I said , by the end of the day it is an backend services built with wb frameworks like honojs to handle server side stuff which better auth is part of it so you should treat it as a backend with auth but make sure to include all the necessary info for you from your auth backend to your api gateway to ensure the communication and also make sure to include the origin you trust with a better auth config
Jump to solution
3 Replies
KiNFiSH
KiNFiSH3w ago
you still can use honojs on multiple instance handling communication betweeen services with trustedOrigin options in the configs on separetly deployed services
kingkyle
kingkyleOP3w ago
i was thinking exposing the auth endpoints to the api gateway in golang. and only allowing connections to the services and auth from the api gateway. This being said all this is new to me. Would you break what you said down even better?
Solution
KiNFiSH
KiNFiSH3w ago
Yeah as I said , by the end of the day it is an backend services built with wb frameworks like honojs to handle server side stuff which better auth is part of it so you should treat it as a backend with auth but make sure to include all the necessary info for you from your auth backend to your api gateway to ensure the communication and also make sure to include the origin you trust with a better auth config

Did you find this page helpful?