API Keys at an organization level
I am new to better-auth and I want to use the organizations plugin with the api keys plugin. From what I saw in the documentation it looks like the api keys are tied to a user. I wanted to get api keys to work at an organization level instead. My initial thoughts are to use the anonymous plugin, and create "service" users for each organization and create api keys for the "service" user. I am using the anonymous plugin to avoid having to create a user with email and password. Is this a good approach or is there a better way of doing this? Thanks!
Note: I am building an API first application.
4 Replies
We intend to support org-level API keys in the future.
@Ping is their any timeline or so ?
Unfortunutely not, after discussing it with Bekacru we decided that the current solution works, just need use metadata.
Thanks @Ping but how will i query the data based on metadata using better auth ?