plain-lunch-50969
05/31/2024, 7:47 PMchilly-king-10285
05/31/2024, 7:47 PMchilly-king-10285
05/31/2024, 7:48 PM<http://kratos.bar.com|kratos.bar.com>
and <http://ui.bar.com|ui.bar.com>
will work, <http://kratos.bar.com|kratos.bar.com>
and <http://bar.com|bar.com>
will work, but <http://kratos.bar.com|kratos.bar.com>
and <http://not-ar.com|not-ar.com>
will not work. This is because Ory Kratos' browser features rely heavily on HTTP Cookies to mitigate common attack vectors and make the integration as easy as possible to use. However, running the services on different ports is acceptable, as long as the domain stays the same. Also, it's important to note that HTTP Cookies ignore ports, meaning the browser will send a cookie it received for <http://my-domain.com:1234>
to <http://my-domain.com:4321>
as well. For more information, you can refer to the following documentation: - [Initialization and redirect to UI](https://www.ory.sh/docs/kratos/self-service#initialization-and-redirect-to-ui) - [Advanced base URL, CSRF and session cookie settings](https://www.ory.sh/docs/kratos/guides/multi-domain-cookies) - [Running on separate (sub)domains](https://www.ory.sh/docs/kratos/debug/csrf#running-on-separate-subdomains) - [Initialize settings flow](https://www.ory.sh/docs/kratos/self-service/flows/user-settings#initialize-settings-flow) - [Browser flows for client-side apps: Single-Page-Apps, React.js, Angular, Next.js, ...](https://www.ory.sh/docs/kratos/self-service#browser-flows-for-client-side-apps-single-page-apps-reactjs-angular-nextjs-)plain-lunch-50969
05/31/2024, 7:48 PMchilly-king-10285
05/31/2024, 7:48 PMchilly-king-10285
05/31/2024, 7:49 PMplain-lunch-50969
05/31/2024, 7:50 PMchilly-king-10285
05/31/2024, 7:50 PMchilly-king-10285
05/31/2024, 7:51 PMplain-lunch-50969
05/31/2024, 7:51 PMchilly-king-10285
05/31/2024, 7:51 PMchilly-king-10285
05/31/2024, 7:52 PM/login/customer
or /login/employee
. This can be achieved either by having two different login routes, or by adding some logic to your login UI that reroutes customers to /login/customer
and employees to /login/employee
. You define the same login or registration UI URLs in both of the Kratos configurations. You may need to tell your login/registration UI which Kratos it's supposed to talk to. The instances are cheap to deploy and the databases are isolated from each other. This way, you can have multiple frontends (or multiple instances of Kratos) that use the same underlying user data. However, each instance of Kratos would need to be configured to point to the correct frontend. For more information, you can refer to the following documentation: - [How can I separate customers/employee data, but have them use the same login dialog](https://www.ory.sh/docs/kratos/debug/troubleshooting#how-can-i-separate-customersemployee-data-but-have-them-use-the-same-login-dialog)plain-lunch-50969
05/31/2024, 7:53 PMchilly-king-10285
05/31/2024, 7:53 PMchilly-king-10285
05/31/2024, 7:54 PMplain-lunch-50969
05/31/2024, 7:54 PMchilly-king-10285
05/31/2024, 7:54 PMchilly-king-10285
05/31/2024, 7:54 PMplain-lunch-50969
05/31/2024, 7:59 PMchilly-king-10285
05/31/2024, 7:59 PMchilly-king-10285
05/31/2024, 7:59 PMplain-lunch-50969
06/06/2024, 4:50 PMchilly-king-10285
06/06/2024, 4:50 PMchilly-king-10285
06/06/2024, 4:50 PMdefault_browser_return_url
under the selfservice.flows.registration.after
configuration key. Here is an example of how you can set it up: yaml selfservice: flows: registration: after: default_browser_return_url: <https://end-up-here-after-registration/>
In this example, after a successful registration, the user will be redirected to <https://end-up-here-after-registration/>
. You can find more details in the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/concepts/browser-redirect-flow-completion#post-registration-redirection).plain-lunch-50969
06/06/2024, 7:16 PMchilly-king-10285
06/06/2024, 7:16 PMchilly-king-10285
06/06/2024, 7:16 PMyaml selfservice: flows: registration: after: default_browser_return_url: <https://end-up-here-after-registration/>
Make sure the URL is correctly set and accessible.