Need help in setting up Better Auth with Ronin on Next.js
Code is here: https://github.com/genxai/gen
GitHub
GitHub - genxai/gen: Generate code, images, video
Generate code, images, video. Contribute to genxai/gen development by creating an account on GitHub.
15 Replies
its a simple next.js setup
where I want to make auth work like this
using @daveycodez https://better-auth-ui.com perhaps
Better Auth UI
Better Auth UI
UI components for the most comprehensive authentication library for TypeScript.



the tricky part is that this project is using https://ronin.co as its database (which is libsql based but I can't use any of the drizzle stuff etc.)
the better auth plugin has to be custom
@bekacru wrote a version of such plugin here: https://github.com/nikitavoloboev/better-auth-ronin
GitHub
GitHub - nikitavoloboev/better-auth-ronin
Contribute to nikitavoloboev/better-auth-ronin development by creating an account on GitHub.
but its unclear how to make use of it to make it actually work with ui and ronin
currently
ronin
schema looks like this
I'm not sure what the adapter has to do with the UI library. You just need to pass the adapter to the server auth config. What am I missing?
yea but i don't get how to pass the adapter
im currently hand rolling my own auth due to this and its such a pain 😿

using just this

@bekacru if you get time, can you help avoid using our own auth for this project 🙏
will be forever grateful
thank you
since last time we talked, ronin added full type safety support
wait, i'm not sure if I'm getting what the issue is exactly. you just nede to copy the adapter code and add it to your auth config.
and you should be done
move this file into your repo
https://github.com/nikitavoloboev/better-auth-ronin/blob/main/src/index.ts
GitHub
better-auth-ronin/src/index.ts at main · nikitavoloboev/better-aut...
Better Auth plugin for Ronin. Contribute to nikitavoloboev/better-auth-ronin development by creating an account on GitHub.
ok ronin made a plugin https://github.com/ronin-co/better-auth
GitHub
GitHub - ronin-co/better-auth: A Better Auth adapter for RONIN
A Better Auth adapter for RONIN. Contribute to ronin-co/better-auth development by creating an account on GitHub.
trying to integrate it now
p.s. congrats on YC ✨
saw this! let me know if you're facing issues