Next.js Discord

Discord Forum

Custom auth or should I use lib

Unanswered
MarkMiklos posted this in #help-forum
Open in Discord
Avatar
I rolled out my own auth with db sessions based on lucia-next as it gets deprecated soon, but Im not sure if I should go this path or just choose a lib, I have my eyes on better-auth as it is pretty well documented and also supports drizzle. What are your takes on this topic?

10 Replies

Avatar
🅱️
Avatar
It depends on your requirements. I'm using better-auth and it's good enough for my needs. My only issue with it is you'll eventually roll your own solutions if you require advanced features, such as email OTP.

If you want a complete auth solution, check out Clerk but it will cost you.
Avatar
@Brokenwind It depends on your requirements. I'm using better-auth and it's good enough for my needs. My only issue with it is you'll eventually roll your own solutions if you require advanced features, such as email OTP. If you want a complete auth solution, check out Clerk but it will cost you.
Avatar
I don’t want to depend on a third party paid solution.

My app handles an admin auth, and each of the “tenant” has its own page that handles client auth, now I only need email and pw, but in the near future i need to add google and apple at least, that’s why I can’t decide
Avatar
🅱️
Avatar
American Chinchilla
I like passport.js
Avatar
@American Chinchilla I like passport.js
Avatar
Im not a fan, and also it doesn't fit into the app
Avatar
@MarkMiklos Im not a fan, and also it doesn't fit into the app
Avatar
American Chinchilla
There is also clerk
But it will handle most of the auth logic if thats fine with you
But you can still use drizzle with it