Multiple domains for the same client?

Hi,

We need to do something, and I’m not sure it’s possible. Just wanted to ask here to make sure.

We have a Node.js app and we’re using the express-openid-connect package. The environment we deploy the application on, can be accessed by several URLs (usually one internet and one intranet). However, it seems like it isn’t possible for Auth0 to handle this set up with the multiple domains, because you have to configure the express-openid-connect middleware by passing the baseURL (set with environment variable or otherwise passed to the config), and this can only be a single value, so it can handle only one domain.

Hi,

The Auth0 domain is the same, but you can still create two separate client applications with different callback urls. One for you public facing website, and another one for your internal/intranet site. When you configure the OpenID Connect package, you set different Client ID for them, the client id for the public one, and the client id for the intranet.

Does that work for you ?

Thanks

It’s one server, with multiple domains pointing to the same server. And you have to pass baseUrl to the package. But the server has more than one possible baseUrl.

But yeah, if it were two different servers, then that would work.

I got it now. Yes, it looks like what you are trying to impmement it is not possible unless you use different websites (node.js apps) and each domain points to each one.

1 Like

Thanks!!! Just wanted to verify what we suspected, and make sure we weren’t overlooking anything.

1 Like

I am so happy to see that the issue have been solved. I am also looking for the same content. Keep suggesting such info.

www.upsers.com