how to use organization plugin adapter
I'd like to use the organization adapter's method
findMemberByOrgId. since it already exists I'd like to avoid writing the db query myself.
https://github.com/better-auth/better-auth/blob/dd27fa9b7981e900fb59c317c1f4aed53c05e45a/packages/better-auth/src/plugins/organization/adapter.ts#L192
how to access it from user land?GitHub
better-auth/packages/better-auth/src/plugins/organization/adapter.t...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
1 Reply
I don't think you can get the adapter, because it does not seem to be exported. But can't you just cache the entire list? Querying database is more expensive if the changes to the data do not happen often and you could use hook system to the organization endpoints to determine if your cache is out of date if you need always the latest data