<@498057949541826571> is grpc golang example ready
# general
a
@rp is grpc golang example ready
r
Hey!
I don’t think we can directly support grpc cause we rely on cookies for sessions to work
a
I have a 2 microservices ready in golang micro framework which relies on grpc. What I want is that only logged in users can use the two microservices . What should be the flow?
please guide
r
Are those micro services being called by the frontend or another backbench service?
a
for now directly but in the future I am planning to use an api gateway that will proxy the requests. Micro framework makes the services written available on single endpoint with different path. Say localhost:8080/user and localhost:8080/profile If grpc was supported I would have made another service at localhost:8080/auth for supertokens.
r
hmm. So our Auth APIs are all http
a
Yes
r
if you like, you can enable JWT for our sessions, and then send the JWT from the frontend to the grpc services.
i doubt it will be possible to do our access / refresh session flows with grpc without lots of customisations.
so the best solution is to go the JWT route
a
Micro exposes services at localhost:8080 as http consumption and localhost:8081 for grpc consumption. Would it not be possible to expose supertokens at Port 8080? I suggest you to check micro.dev first and see if something is possible otherwise I will go for the JWT route definitely.
r
it would be possible to expose supertokens on 8080
butt he APIs for GRPC won't be able to do session verification in the default supertokens way
so for those, i suggested using JWTs
a
Is there any security issue with this approach? Also can you add an example implementing the same
r
Security issues are the same as that that come along with using a JWT.