Need help in setting up Better Auth with Ronin on Next.js

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
nikiv.dev
nikiv.devOP2mo ago
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.
No description
No description
No description
nikiv.dev
nikiv.devOP2mo ago
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
RONIN
nikiv.dev
nikiv.devOP2mo ago
@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.
nikiv.dev
nikiv.devOP2mo ago
but its unclear how to make use of it to make it actually work with ui and ronin
nikiv.dev
nikiv.devOP2mo ago
currently ronin schema looks like this
No description
bekacru
bekacru2mo ago
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?
nikiv.dev
nikiv.devOP4w ago
yea but i don't get how to pass the adapter
nikiv.dev
nikiv.devOP4w ago
im currently hand rolling my own auth due to this and its such a pain 😿
No description
nikiv.dev
nikiv.devOP4w ago
using just this
No description
nikiv.dev
nikiv.devOP4w ago
@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
bekacru
bekacru4w ago
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.
cosnt auth = betterAUth({
adapter: roninAdapter()
})
cosnt auth = betterAUth({
adapter: roninAdapter()
})
and you should be done
bekacru
bekacru4w ago
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.
nikiv.dev
nikiv.devOP3w ago
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.
nikiv.dev
nikiv.devOP3w ago
trying to integrate it now p.s. congrats on YC ✨
bekacru
bekacru3w ago
saw this! let me know if you're facing issues

Did you find this page helpful?