surreal-better-auth
Version:
Better Auth adapter for SurrealDB
30 lines (23 loc) • 976 B
Markdown
This adapter allows you to use [SurrealDB](https://surrealist.app/referral?code=4pn5aba943lpbn8l) as a database for your [Better Auth](https://better-auth.com) implementation.
⭐ Found this project helpful? Show some love with a star and consider to be a [SPONSOR](https://github.com/sponsors/oskar-gmerek)! Your support keeps the code evolving. 🚀
✨✨✨ Grab [FREE SurrealDB Cloud instance + something extra](https://surrealist.app/referral?code=4pn5aba943lpbn8l) ✨✨✨
```bash
bun add surreal-better-auth
```
```ts
import { surrealAdapter } from 'surreal-better-auth'
import { databaseInstance } from './your-surreal-singleton'
...
export const auth = betterAuth({
...
database: surrealAdapter(databaseInstance)
...
})
```
Contributions are welcome! Please open an issue or a pull request if you have any suggestions or improvements.