0

I have a grpc service which gets authorized via JwtToken after reading it from grpc metadata and angular application which calls my grpc service using grpc-web. I login into my angular app using SSO, http header will be having the authorization token. Now how to send this authorization token in http header to my grpc service? Note: grpc-web plugin in Kong is used as http/1.1 to http/2 converter.

Tried to check options read http headers in angular and then set the grpc metadata with authorization header. Looking for options to the above ask.

  • Damn, I've written a custom interceptor for grpc that's the exact same as the official http one but for grpc. I've been meaning to open source it but haven't found the time yet. Don't expect it any time soon because I've got loads to do, but if I do publish it some day, I'll try to remember updating this post – maxime1992 Jun 24 '23 at 21:33
  • Hi! "Tried to check options read http headers in angular and then set the grpc metadata with authorization header" — What you said here makes sense.. does it not work for you, or are you looking for a better alternative? IMO interceptors (https://grpc.io/blog/grpc-web-interceptor/) is your best bet at achieving such things. – Sampajano Jul 11 '23 at 21:21

0 Answers0