Hi, I have a similar question to <https://ory-comm...
# ory-network
l
Hi, I have a similar question to https://ory-community.slack.com/archives/C02MR4DEEGH/p1679385198048179 The redirect uri that Ory generates uses the project slug instead of my custom domain (see pic). Looks like I may be missing a config value. But I have multiple custom domains, and I would like to redirect the user back to the one they started on. Is this possible?
p
Hi @limited-photographer-61008 Yes, please take a look at https://www.ory.sh/docs/troubleshooting/troubleshooting-social-sign-in
l
So I can have multiple redirect uris set and Ory will pick the right one?
p
Hmm, so with multiple domains it should work normally without needing to change the
/selfservice/methods/oidc/config/base_redirect_uri
config. ...But if you have a consent screen that needs to be scoped to a specific domain that you own, then it won't work since this config value only supports a singular domain value.
I'm assuming you want the latter?
l
There is actually no consent screen. So that is fine. The 2 custom domains are on totally different domains, not just different subdomains. I’m just worried about the cookies being set on the correct domain.
I don’t have the full flow working yet, so I haven’t been able to test it won’t work with the ory slug domain as the redirect.
p
In that case, just set the redirect_uri at the oidc provicer to the ory domain
l
That is how it is set up. And so, when the user gets redirected back, the flow should know which custom domain to set the cookie for?
p
it should set it according to the initial host from where the request originated i believe. e.g. mydomain1.com -> oidc provider -> callback ory domain -> mydomain1.com mydomain2.com -> oidc provider -> callback ory domain -> mydomain2.com.
l
Ok. That’s perfect if it works that way.
p
let me know if something isn't working and I'll take a look 🙂
l
Thanks 🙏