db is not exposed in context
According to the docs at: https://www.better-auth.com/docs/concepts/plugins#what-can-a-plugin-do, the context object contains the db instance, like kysely.
For me, it does not, please see the attachment to this post. Not only in my editor but also console logging the context object does not reveal the db instance.
What do I need to do to expose the DB instance? I need to make joins due to performance reasons and I dont think the adapter is capable of it.
Plugins | Better Auth
Learn how to use plugins with Better Auth.

1 Reply
Right now there isn't support for JOINs.