hono icon indicating copy to clipboard operation
hono copied to clipboard

hc with Credentials?

Open yusukebe opened this issue 11 months ago • 1 comments

Discussed in https://github.com/orgs/honojs/discussions/2291

Originally posted by lajbel March 1, 2024 Looks pretty obvious to have something like credentials in the configuration of hc, something like this

const authClient = hc<SomeType>("/api/auth/", {
    headers: {} // You can already set headers!
    credentials: "include",
});

I was searching here and there's only one option available to do this approach

const api = hc<AppType>("api/auth", {
  fetch: (req, init) =>
    fetch(req, {
      ...init,
      credentials: "include", // Why not have all fetch options too?
    })
})

RPC is pretty awesome, but some things are missing

yusukebe avatar Mar 16 '24 09:03 yusukebe

You can see more details in #2291.

yusukebe avatar Mar 16 '24 09:03 yusukebe

Fixed by #2592

yusukebe avatar May 07 '24 09:05 yusukebe