smnbbrv / ngx-grpc

Angular gRPC framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

withCredentials support

hellraisercenobit opened this issue · comments

grpc-web support withCredentials to enable httponly cookie transport.
essential to share JWT authentification on multiples apps without Authorization header.

See: https://github.com/grpc/grpc-web/pull/604/files
It's seems it's not supported on ngx-grpc.
Just add another argument after metadata should be OK :)

Thanks for the issue, I'll have a look

Checking https://github.com/stanley-cheung/grpc-web/blob/db566ddf78b6f90613317618ad3380f96f5b32cf/javascript/net/grpc/web/grpcwebclientbase.js , seems there is no need in another argument, it actually looks more like a typo. This is just another argument on configuration. I'll add the type definitions with the next release, but you should be already able to use it in normal settings together with host, format etc

I confirm withCredentials: true flag working with ngx-grpc too