Hello, is there any example doing this integratio...
# general
h
Hello, is there any example doing this integration using API
r
Hey @heatbr there isn’t an example of this as such yet. But the easiest way to use supertokens along with Java is to host another service in node / golang or python which uses our SDK and acts as the auth server to your Java backend.
Hey!
There isn’t an example for this yet. But the easiest way to use supertokens with a Java backend is to setup a node / python or golang service which integrates with our SDK and is the auth server to your Java backend. Does that work for you?
h
yes I think it'll work. because we have kong api gateway I'm able to handle the autho to another stack. I still have a doubt, because it's session based is it not necessary the /auth route being along as middleware ?
what you said is I can do the auth on another service, for instance node with only the auth route and then use the given tokens to send the request to my java service ?
and then my java service is able to handle doing request directly to the api.
r
> what you said is I can do the auth on another service, for instance node with only the auth route and then use the given tokens to send the request to my java service ? yes. > and then my java service is able to handle doing request directly to the api. Which API? I thought the java service was the API.
> I still have a doubt, because it's session based is it not necessary the /auth route being along as middleware ? I don't think I understood this. The node server should reside on the same base domain (same or different sub domain) as the java service - cause it's cookie based sessions. So if the java service is api.example.com, then node can be api.example.com/auth/* or auth.example.com/* (in this case you can set the apiDomain to be "/"). Does this answer the question?
h
> Which API? I thought the java service was the API. I mean the suprtokens core. > Does this answer the question? Yes it does. thank you
r
> I mean the suprtokens core. Ah yea.. sure. Your java service can talk to the core as well using its REST APIs. Nothing stopping you from doing that.