H
Hono4mo ago
igmtink

How to set "credentials: true" in client side using rpc?

I'm using rpc with react query on the client side, this kind of fetching has already credentials: true?
No description
12 Replies
igmtink
igmtink4mo ago
It's not sending the cookie to my client side
No description
No description
Nico
Nico4mo ago
Are they running on different ports? There’s browser extensions like allow cors that will let you set it on different ports
igmtink
igmtink4mo ago
yes, actually I already set the cors with origin: localhost:3000 for my client also set the credentials to true
igmtink
igmtink4mo ago
No description
igmtink
igmtink4mo ago
No description
Nico
Nico4mo ago
Can you text and postman and see if it’s coming through
igmtink
igmtink4mo ago
here's my client
Nico
Nico4mo ago
I always had wired issues when working on different ports
igmtink
igmtink4mo ago
on the postman there's no problem at all when I request my login to send the cookie and then I request to my user route that there's verify my cookie it's okay there's no problem and I forgot to mention when I'm using fetch api it's sending the cookie to my client, but when I use the react query with rpc I can only see the cookie from network on the chrome dev tool but in the application tab I can't see the cookie
igmtink
igmtink4mo ago
GitHub
Setting a cookie using (rpc + react query) · honojs · Discussion #2...
I'm sending a request to my login api endpoint from to client using react query and rpc but I'm not getting the cookie from my application tab in chrome dev tools but on the network tab the...
igmtink
igmtink4mo ago
when I'm using standard fetch api with credentials: 'include' option, there's no problem at all I got the cookie from server to client, but when using rpc I can't get the cookie from server to client
igmtink
igmtink4mo ago
I already fixed, by adding this fetch option, why this option is not included on the docs? I mean there's fetch option in the docs but the example is only for using env
No description