How are built-in API endpoints / routes enabled?
According to the docs when using emailandpassword on the server one can use the endpoint /sign-up/email, https://www.better-auth.com/docs/authentication/email-password#sign-up. So when I Hono is set up, like in the bun-hono-better-auth project, https://github.com/ProMehedi/bun-hono-better-auth/blob/main/server/src/server.ts
it might be reasonable to expect that for example a basic API endpoint like /sign-up/email might be available without your own implementation. But turns out it, and others, aren't there, I'm getting just 404s, so something else is needed. But what is it?
Is it just that this expectation that there are starter API endpoints for signups, login, logout and some others coming with BetterAuth, extended or modified with emailAndPassword, for example, that expectation is ill-founded? You still have to implement these? It's not optional to do so only when you have extended needs?
In this case it's in relation to Hono as backend server I'm asking. I looked at the bun-hono-better-auth project, because in my own project I couldn't get these API end points to be available either, using Hono.
The auth config is pretty much this one, https://github.com/ProMehedi/bun-hono-better-auth/blob/main/server/src/config/auth.config.ts, though I commented out social.
Thankful for any pointers.
// Better-Auth - Handle all auth routes
app.all('/api/auth/*', async (c) => {
return await auth.handler(c.req.raw)
})it might be reasonable to expect that for example a basic API endpoint like /sign-up/email might be available without your own implementation. But turns out it, and others, aren't there, I'm getting just 404s, so something else is needed. But what is it?
Is it just that this expectation that there are starter API endpoints for signups, login, logout and some others coming with BetterAuth, extended or modified with emailAndPassword, for example, that expectation is ill-founded? You still have to implement these? It's not optional to do so only when you have extended needs?
In this case it's in relation to Hono as backend server I'm asking. I looked at the bun-hono-better-auth project, because in my own project I couldn't get these API end points to be available either, using Hono.
The auth config is pretty much this one, https://github.com/ProMehedi/bun-hono-better-auth/blob/main/server/src/config/auth.config.ts, though I commented out social.
Thankful for any pointers.
GitHub
A high-performance full-stack template using Bun, Hono, and Better Auth with MongoDB integration. - ProMehedi/bun-hono-better-auth
