ory/docs

Document multi-domain custom UI URLs

Closed this issue · 2 comments

Preflight checklist

Related issue: ory/network#218

Document content

The Ory Network has the ability to configure custom UI URLs per custom domain.

For example when I have multiple custom domain on a singular project auth.example.com and cname.foobar.com I would like to configure a custom UI for each TLD example.com and foobar.com.

In the past this was not possible due to the Custom UI only accepting a singular URL per flow, e.g. login flow had only one URL on the project. Relative URLs were also not a solution since the cname would adopt the relative URL. auth.example.com -> login flow with /login relative URL would result in https://auth.example.com/login which will not work! A custom domain added to a project can only point to the project and not to another service hosting the UI!

With these new changes the Custom UI page on the console will allow selecting the custom domain and setting a custom ui base url. This URL will then map on top of any absolute or relative url the project has already configured.

For example:
Custom UI Base URL: https://custom-domain.com/auth
Login URL: https://my-ui.com/login
Registration URL: /registration

Will map accordingly:
Login -> https://custom-domain.com/auth/login
Registration -> https://custom-domain.com/auth/registration.

NOTE: When setting the Custom UI Base URL the Account Experience will be inaccessible for that particular custom domain. Other custom domains will still function correctly.

The normal <project-slug>.projects.oryapis.com will redirect to the first cname it knows of.

On the Ory CLI tunnel setting the ORY_SDK_URL or ORY_KRATOS_URL environment variable to your custom domain that has a custom base URL set will result in the tunnel redirecting to the custom base URL. It is best to use the project-slug for the Ory CLI tunnel to always work correctly.

image

Additional Context

This is not released yet, but will be coming soon!