This message was deleted.
# general
m
This message was deleted.
👍 1
t
What I want is, if the user is already logged in at https://mysite.com, when he enters https://sub.mysite.com, there is no need to log in again.
w
Then you just use mysite.com as cookie domain, in that case cookies are sent to that specific domain as well as all subdomains.
1
With the Scale Plan you can use multiple cookie domains (it seems), so you can use the same project on site1.com and site2.com, although you would have to log in again on the other domain (I think).
When self-hosted you can only use a single cookie domain, e.g. mysite.com, and their subdomains. If you want to use the same project on multiple domains, then you would have to use OAuth2 / Hydra.
👍 1
t
i am try to do that, but i cannot found any docs
put this fake domain on my host
then got above error.
w
That's not related to your cookie setup but due to your cors policy.
You need to allow the origin you are querying the Kratos endpoint from
So cookie domain determines to which endpoints your Kratos cookies are sent to, i.e. where you stay logged in, the cors policy determines from which origins you are allowed to query the Kratos instance from the browser.
t
how to setup the allowed origin ? use ory cli ?
it seams like i need to update plan to setup cors?
look like developer plan does't have this settings.
m
Yes to add a custom domain you need to be on a paid plan @tall-mouse-53965
t
ok
can you let me have a trial first? make sure all thing works, then i consider to upgrade my plan.
m
You can use Ory Tunnel to try out things locally without a CNAME: https://www.ory.sh/docs/guides/cli/proxy-and-tunnel
We would love to offer free CNAMEs for trial, but we also have to pay for each CNAME unfortunately.