integrations/better-auth #555
Replies: 4 comments 5 replies
-
| Remember, don’t forget to add the OpenAPI plugin before following these instructions: import { betterAuth } from "better-auth"; export const auth = betterAuth({ | 
Beta Was this translation helpful? Give feedback.
-
| I'm using Elysia.js and have the following setup: export const authRoutes = new Elysia({ prefix: "/auth" }).all(
  "/*",
  ({ request }) => auth.handler(request),
);And let's say we have a structure like this. const app = new Elysia()
  .use(elysiaLogger)
  .use(cors())
  .group("/api/v1", (app) => {
    return app.use(authRoutes);
  })
  .listen(3000);How do I access the routes defined in authRoutes? My instinct was to access better auth endpoints at  | 
Beta Was this translation helpful? Give feedback.
-
| Using the given macro that checks for user authentication, it returns a  | 
Beta Was this translation helpful? Give feedback.
-
| I am receiving an error in a route file when trying to use the auth macro. I configured Better Auth. I used the plugin in my index.ts but on my route I can't receive the typing when I put the auth macro What am I doing wrong? | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
integrations/better-auth
We may use @better-auth/cli to generate auth schema and migrate our database as well.
https://elysiajs.com/integrations/better-auth
Beta Was this translation helpful? Give feedback.
All reactions