some-painting-28549
09/01/2024, 5:05 PM{
"id": "f38bf1c6-23de-445f-ba66-2fa29b96122b",
"error": {
"code": 400,
"id": "self_service_flow_return_to_forbidden",
"message": "The request was malformed or contained invalid parameters",
"reason": "Requested return_to URL \h\" is not allowed.",
"status": "Bad Request"
},
"created_at": "2024-09-01T17:04:12.845748Z",
"updated_at": "2024-09-01T17:04:12.845748Z"
}chilly-king-10285
09/01/2024, 5:05 PMchilly-king-10285
09/01/2024, 5:05 PMreturn_to
URL you're trying to use is not allowed. This is because Ory uses an allow list to prevent Open Redirect Attacks. Only certain domains or paths on a domain are allowed. To fix this error, you need to add the domain of your return_to
URL to the allow list in your Ory configuration. Here's an example of how to do this: yaml selfservice: allowed_return_urls: - <https://app.bettersea.tech/>
In this example, <https://app.bettersea.tech/>
is added to the allow list, so it can now be used as a return_to
URL. For more information, you can refer to the [Ory documentation on redirection](https://www.ory.sh/docs/kratos/concepts/browser-redirect-flow-completion#redirection) and [Ory documentation on allow list](https://www.ory.sh/docs/concepts/redirects).chilly-king-10285
09/01/2024, 5:05 PMchilly-king-10285
09/01/2024, 5:05 PMreturn_to
URL you're trying to use is not allowed. This is because Ory uses an allow list to prevent Open Redirect Attacks. Only certain domains or paths on a domain are allowed. To fix this error, you need to add the domain of your return_to
URL to the allow list in your Ory configuration. Here's an example of how to do this: yaml selfservice: allowed_return_urls: - <https://your-allowed-url.com/>
In this example, <https://your-allowed-url.com/>
is added to the allow list, so it can now be used as a return_to
URL. For more information, you can refer to the [Ory documentation on redirection](https://www.ory.sh/docs/kratos/concepts/browser-redirect-flow-completion#redirection) and [Ory documentation on allow list](https://www.ory.sh/docs/concepts/redirects).some-painting-28549
09/01/2024, 6:41 PMchilly-king-10285
09/01/2024, 6:41 PMchilly-king-10285
09/01/2024, 6:41 PMreturn_to
URL is not allowed. However, you've mentioned that the URL is already included in the allowed_return_urls
list in your Ory configuration. One possible issue could be that the URL you're trying to use as a return_to
URL is not exactly the same as the one in the allowed_return_urls
list. The URLs must match exactly. For example, <http://my-url/callback>
and <http://my-url/callback?foo=bar>
are considered different URLs. Another possible issue could be related to the URL scheme. The [Ory documentation](https://www.ory.sh/docs/concepts/redirects#invalid-url) mentions that the allow list and any of the post-flow redirects require a valid URL with a scheme (HTTP or HTTPS). If none of these seem to be the issue, it might be helpful to check the logs for more detailed error messages or to verify the exact return_to
URL that's being used. If you're still having trouble, you might want to consider reaching out to the Ory community or support for more specific guidance.some-painting-28549
09/01/2024, 6:46 PMchilly-king-10285
09/01/2024, 6:46 PMchilly-king-10285
09/01/2024, 6:46 PMbash hydra serve all >log.txt 2>&1
This command will start the Hydra service and redirect all output (both stdout and stderr) to a file named log.txt
. If you're running Ory in a Docker container, you can use the docker logs <container-id>
command to view the logs for a specific container. For more information, you can refer to the [Ory documentation on logging](https://www.ory.sh/docs/self-hosted/operations/logging).