onethread
onethread
TtRPC
Created by onethread on 6/6/2024 in #❓-help
Cookies not being passed on to client
Hi all, I can't tell if I'm simply trying to wrangle TRPC into doing something it's not designed to do, or if I'm just doing it wrong. I'm using trpc to proxy our auth server, something like:
.mutation(async ({ input }) => {
const response = await fetch(`http://127.0.0.1:3030/auth/login`, {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
credentials: "include",
},
...
.mutation(async ({ input }) => {
const response = await fetch(`http://127.0.0.1:3030/auth/login`, {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
credentials: "include",
},
...
In the trpc router, I see in the fetch response that there are cookies in the headers, but when I inspect Chrome's version of the response, there are no cookies to be found. Is there something else I need to be configuring or is this simply out of TRPC's purview?
2 replies