quiet-painting-32952
10/15/2024, 6:48 AM.ory/self-service/login/browser?refresh=true
it returns a response with the request_url field with my domain in http rather than https. How can I force it to return an https endpoint?brief-egg-61061
10/15/2024, 6:49 AMbrief-egg-61061
10/15/2024, 6:49 AMquiet-painting-32952
10/15/2024, 6:52 AMquiet-painting-32952
10/15/2024, 8:42 AMory proxy <http://localhost:8000> <https://staging.auth.domain.co.uk> --project peaceful-cannon-4isvhsypte --cookie-domain <http://staging.auth.domain.co.uk|staging.auth.domain.co.uk> --allowed-cors-origins <https://staging.auth.domain.co.uk:8000> --allowed-cors-origins <https://staging.portal.domain.co.uk> --default-redirect-url <https://staging.portal.domain.co.uk>
THe proxy is running in an ec2 instance in the https://staging.auth.domain.co.uk domain but I redirect it to https://staging.portal.domain.co.uk. However when I get redirected to https://staging.portal.domain.co.uk the cookie is not being used by the browser.brief-egg-61061
10/15/2024, 8:42 AMbrief-egg-61061
10/15/2024, 8:42 AM--cookie-domain
to <http://staging.auth.domain.co.uk>
. However, cookies are typically set to the top-level domain. For example, if your application is running on <https://app.example.org>
, you would set --cookie-domain
to <http://example.org|example.org>
[source](https://www.ory.sh/docs/cli/ory-tunnel#cookies). Also, note that cookies ignore the port number. A cookie set with Set-Cookie: <name>=<value>; domain=<http://example.org:1234|example.org:1234>
will be sent to <https://example.org:443>
, <http://example.org:80>
, and <http://api.example.org:1234>
[source](https://www.ory.sh/docs/security-model#http-cookie-domains). Furthermore, the --allowed-cors-origins
flag should be set to the domain that will be making requests to your Ory Proxy. In your command, you're setting --allowed-cors-origins
to <https://staging.auth.domain.co.uk:8000>
and <https://staging.portal.domain.co.uk>
. If these domains are not making requests to your Ory Proxy, you might need to adjust this setting. Lastly, ensure that your application and Ory Proxy are available on the same domain. Cookies work best on the same domain, and running them on separate subdomains or different domains can cause issues [source](https://www.ory.sh/docs/kratos/debug/csrf#common-issues). If you continue to experience issues, I recommend referring to the [Ory documentation](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel) or seeking assistance from the Ory community or support channels.quiet-painting-32952
10/15/2024, 4:59 PMbrief-egg-61061
10/15/2024, 4:59 PMbrief-egg-61061
10/15/2024, 5:00 PM--dev
flag and setting --allowed-cors-origins
to <http://localhost:8000>
, <http://localhost:4000>
, and <http://localhost:5173>
. This means that these domains are allowed to make requests to your Ory Tunnel. However, you're running your frontend website on <http://localhost:5173>
. If your Ory Tunnel is not running on the same domain (in this case, localhost
), the browser might not be able to use the auth cookie. Here are a few things you can check: 1. Ensure that your application and Ory Tunnel are running on the same domain. Cookies work best on the same domain, and running them on separate subdomains or different domains can cause issues [source](https://www.ory.sh/docs/kratos/debug/csrf#common-issues). 2. Check your browser's settings to ensure that it's not blocking cookies from localhost
. 3. Review the settings of your Ory Tunnel and your application to ensure that they're correctly configured to use cookies. If you continue to experience issues, I recommend referring to the [Ory documentation](https://www.ory.sh/docs/cli/ory-tunnel) or seeking assistance from the Ory community or support channels.quiet-painting-32952
10/15/2024, 7:36 PMbrief-egg-61061
10/15/2024, 7:36 PMbrief-egg-61061
10/15/2024, 7:36 PM