Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hc with Credentials? #2485

Closed
yusukebe opened this issue Apr 9, 2024 Discussed in #2291 · 1 comment
Closed

hc with Credentials? #2485

yusukebe opened this issue Apr 9, 2024 Discussed in #2291 · 1 comment
Labels
enhancement New feature or request.

Comments

@yusukebe
Copy link
Member

yusukebe commented Apr 9, 2024

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 yusukebe added the enhancement New feature or request. label Apr 9, 2024
@NamesMT NamesMT mentioned this issue May 2, 2024
3 tasks
@yusukebe
Copy link
Member Author

yusukebe commented May 7, 2024

This was resolved by #2592

@yusukebe yusukebe closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant