quaint-potato-13675
06/18/2024, 11:42 AMchilly-king-10285
06/18/2024, 11:42 AMchilly-king-10285
06/18/2024, 11:42 AM?return_to=<https://www.myapp.com/blog/write>
when initializing the Login / Registration /Settings flow. For example, if a user requests <https://www.myapp.com/blog/write>
but isn't logged in, you can redirect the user to that page after login. However, because Ory Identities prevents Open Redirect Attacks, you need to whitelist the domain in your Ory Identities config when using the ?return_to=
query parameter. For other return URLs specified inside the configuration, it isn't necessary to add the domain to the whitelist. Here's an example of how to add a domain to the whitelist: yaml selfservice: allowed_return_urls: - <https://www.myapp.com/>
Please note that the return URL can also be set in the configuration for each Self-Service Flow or per method, which will override the default return URL. For example: yaml selfservice: flows: login: after: default_browser_return_url: <https://end-up-here-after-login/> registration: after: default_browser_return_url: <https://end-up-here-after-registration/>
For more details, please refer to the [Ory documentation](https://www.ory.sh/docs/kratos/concepts/browser-redirect-flow-completion#redirection).