Kevin
Kevin
BABetter Auth
Created by Kevin on 3/7/2025 in #help
Hono RPC session not in request
When i use the RPC with hono client. Session not defined BACKEND const app = new Hono<honoVariables>() .use( "", cors({ origin: "http://localhost:5173", allowHeaders: ["Content-Type", "Authorization"], allowMethods: ["POST", "GET", "OPTIONS"], exposeHeaders: ["Content-Length"], maxAge: 600, credentials: true, }) ) .use("", async (c, next) => { const session = await auth.api.getSession({ headers: c.req.raw.headers }); if (!session) { c.set("user", null); c.set("session", null); return next(); } c.set("user", session.user); c.set("session", session.session); return next(); }) .on(["POST", "GET"], "/api/auth/*", (c) => { return auth.handler(c.req.raw); }) SESSION NOT DEFINED const api = hc<AppType>(import.meta.env.VITE_BACKEND_URL + '/') const response = await api.room.$get() SESSION DEFINED const response = await fetch(/rooms, {credentials: true})
2 replies
BABetter Auth
Created by Kevin on 1/23/2025 in #help
I would like to create a flutter betterauth_client package
Is it something realistic ? I start looking on the native script package but do you have any guideline or tips to help me on my goal ?
11 replies