Hi, Is there any way I can host Kratos in one serv...
# talk-kratos
a
Hi, Is there any way I can host Kratos in one server and my web app on another server ?
m
As long as they are on the same domain (eg kratos.example.com and example.com)
a
different domains ?
m
They have to be on the same domain (different sub-domains are okay). Kratos will set a session cookie (when you use the browser flow). That is why they must be on the same domain.
a
Yes I have come across this, but am looking for a solution to be able to support different domains. I will post it here if I find anything.
m
Maybe it is not a requirement for that they are on the same domain as long as Kratos is set up to set the cookie domain to your web app domain
r
appears recommended approach is kratos + hydra. docs need to get updated regarding multidomain support
Just wanted to let you know that Ory Kratos now has a native integration with Ory Hydra (works out of the box on https://console.ory.sh) which basically allows multi-domain environments by using SSO with OpenID Connect.
This doesn't really solve the issue here. We will introduce multi-cname support in the cloud system which uses some wrappers to make it work with cloudflare.
In the end, I'm not sure if it really makes sense to support the use case Google has laid out. This works well with one or two sites, but does not scale to 10 or 15 sites as you would be stuck in redirects for a while as a user.
https://github.com/ory/kratos/issues/662#issuecomment-1295192246
w
.