Xenia
BABetter Auth
•Created by Xenia on 3/5/2025 in #help
Unable to use endpoints in custom plugin
Hi,
I'm developing multiple plugins for my project called Cosmos and have encountered an issue. When I implement custom endpoints in a plugin, they aren't accessible through either the auth.api or authClient interfaces. I reviewed the documentation and examined the built-in plugins within better-auth, but I haven't been able to determine if I'm missing something or if there's an actual issue with Better Auth itself.
To isolate the problem, I've created a minimal test project using only Drizzle with PGLite and Hono running on Bun. Additionally, I experienced a related issue when attempting to implement the example birthday plugin from the documentation, the type wasn't properly recognized by the authClient's signUp function. As a workaround, I added the birthday field to inferAdditionalFields.
For reference:
Test project: https://github.com/Creaous/better-auth-custom-plugin-issue
Cosmos: https://github.com/Nexirift/cosmos
5 replies