limited-bear-88249
01/29/2024, 5:46 PMchilly-king-10285
01/29/2024, 5:47 PMchilly-king-10285
01/29/2024, 5:47 PMapp.config.js
file in your project and replace the KRATOS_URL
variable with the SDK URL you copied from your project. [source](https://www.ory.sh/docs/getting-started/integrate-auth/react-native#connect-to-your-project) 2. Define the paths where Ory calls your custom UI: Go to [Ory Console](https://console.ory.sh/) → User Interface. This view allows you to define the URLs of UI views for every self-service flow. You can use relative or absolute paths. Unless you set a custom UI base URL, relative links always use your SDK Configuration URL as the base. [source](https://www.ory.sh/docs/kratos/bring-your-own-ui/configure-ory-to-use-your-ui) 3. Configure Ory to use your UI views hosted on local machine: When developing locally, you can configure Ory Network to use UI views hosted on your local machine. To do that, use [Ory Tunnel](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel) to create a connection between your local environment and Ory Network and configure the system to accept <http://localhost:1234/>
as part of the same domain as your project. [source](https://www.ory.sh/docs/kratos/bring-your-own-ui/configure-ory-to-use-your-ui#development) 4. Configure the login and registration URLs: You can configure which login and registration URLs to use in the Ory Identities config. For example, you can set the ui_url
under selfservice.flows.login
and selfservice.flows.registration
to point to your login and registration pages respectively. [source](https://www.ory.sh/docs/kratos/self-service/flows/user-login#login-for-server-side-browser-clients) [source](https://www.ory.sh/docs/kratos/self-service/flows/user-registration#registration-for-server-side-browser-clients) Please note that Ory Kratos is API-only and doesn't ship with an administrative user interface. You must implement that UI yourself. If you need a managed solution that takes care of everything, consider signing up to [Ory Network](https://console.ory.sh/). [source](https://www.ory.sh/docs/kratos/quickstart#setup)limited-bear-88249
01/29/2024, 5:56 PMchilly-king-10285
01/29/2024, 5:56 PMchilly-king-10285
01/29/2024, 5:57 PM?return_to=
query parameter to set dynamic redirects on self-service flows. This means that after a user completes a flow (like login or registration), they will be redirected to the URL specified in the return_to
parameter. Here's an example of how you can start a self-service login flow with a return_to
URL set: bash curl -X GET 'http://<your-project>.<http://projects.oryapis.com/self-service/login/browser?return_to=http://localhost:3000|projects.oryapis.com/self-service/login/browser?return_to=http://localhost:3000>'
In this example, after the login flow is completed, the user will be redirected to <http://localhost:3000>
. Please note that the allow list
prevents Open Redirect Attacks by only allowing certain domains, or paths on a domain. So, make sure that your return_to
URL is allowed. Also, remember that Ory Kratos and your UI must be hosted on the same top-level domain. For example, <http://kratos.bar.com|kratos.bar.com>
and <http://ui.bar.com|ui.bar.com>
will work, but <http://kratos.bar.com|kratos.bar.com>
and <http://not-ar.com|not-ar.com>
will not work. For more information, you can refer to the [Ory documentation on Browser redirects and flow completion](https://www.ory.sh/docs/concepts/redirects).