Expose "fetchInit" in RpcOptions to allow sending credentials
See original GitHub issueI’m using https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md#grpc-web-transport but I don’t know if there is a way to send credentials like in a classic web client:
initClient({
baseUrl: "localhost:3000",
fetchOptions: { credentials: "include" },
});
Is it possible or am I totally wrong?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Using the Fetch API - MDN Web Docs
If you only want to send credentials if the request URL is on the same origin as the calling script, add credentials: 'same-origin'...
Read more >How to send data using fetch and POST request with ...
@JonasWilms When I do OPTIONS request with Postman, I get Access-Control-Allow-Origin -> * so it's not good if I want credentials? I add...
Read more >Fetch: Cross-Origin Requests - The Modern JavaScript Tutorial
Now fetch sends cookies originating from another.com with request to that site. If the server agrees to accept the request with credentials, it ......
Read more >Fetch Standard
A response has an associated CORS-exposed header-name list (a list ... If credentials is false, then do not send a TLS client certificate....
Read more >Fetch, CORS, and Cookies - YouTube
This tutorial explains the process of setting cookies in the browser as well as from the server. It shows the process of setting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A valid point…
Yes, this should work like improbable-eng.
The following property should be added to twirp-options.ts and grpc-web-options.ts:
And passed to all fetch calls.
I’m a bit swamped right now. Do you want to open a PR?
@timostamm Yeah, I’m hacking around like this… Thanks!