Can I integrate Better-Auth between Nextjs and GO Backend?

hello, can I integrate Better-Auth between Nextjs and GO Backend? Is it possible ?
7 Replies
Ping
Ping2mo ago
It's possible. RIght now, there isn't a better-auth library for GO though, so you'll need to build your own solution which can be challenging. But it's definitely possible. Better Auth works around endpoints, so as long as you have the required headers, body info, method, etc and hit the right endpoints, everything should work. ^ this is assuming you're talking about the better-auth server instance being used on Nextjs. Otherwise if we're talking about better-auth server instance on Go, that isn't an option as of now.
Pororo
PororoOP2mo ago
okey, if that isn't possible now. but is there a way to integrate Better-Auth on Next.js with my API Endpoint from GO Backend ?
shad
shad2mo ago
Hey did you find a solution for this? I'm also working on a next+go app and needed to find a way to connect the two. We can also come up with a solution if you never got any.
Pororo
PororoOP2mo ago
haven't found a solution yet bro
Ping
Ping2mo ago
There isn't any existing GO related Better-auth apis, you guys would have to build everything from the ground up.
shad
shad2mo ago
@Ping Thanks, I guess I'll have to find a work around.
lonelyplanet
lonelyplanet2mo ago
Could you clarify what you quite want? You could have your database shared then use nextjs+betterauth handle login and authentication and if you can then make a GO api that connects to the shared database to validate that that session exists Better Auth is a node library. You would need to run it in a node project like next but you could handle your complex business logic in a separate api but use the shared auth database

Did you find this page helpful?