Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview links on PRs are broken #472

Open
cazala opened this issue Oct 18, 2024 · 0 comments
Open

Preview links on PRs are broken #472

cazala opened this issue Oct 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cazala
Copy link
Member

cazala commented Oct 18, 2024

Currently the preview urls in PRs are not working because it's not possible to log in.

The problem is that the redirect that the explorer-website does to /auth/login does not work, because the preview url is not hosted on decentraland.org but explorer-artifacts.decentraland.org. This can be fixed from the explorer-website side, but then the redirect that is done by the auth ui will not work, because the redirect url is explorer-artifacts.decentraland.org and it does not match the hostname of the auth ui, that is decentraland.org.

There are two ways I can think to fix this:

  1. The first one is to create a path that redirects to the subdomain, like decentraland.org/explorer-artifacts -> explorer-artifacts.decentraland.org, that should fix all the issues mentioned above.

  2. The other option is to make two changes, on the explorer-website and other on the auth ui.

  • explorer-website: Fix the login redirect url so when it detects is being used on explorer-artifacts.decentraland.org it redirects to an absolute url decentraland.org/auth/login instead of a relative one /auth/login. That happens here.

  • auth: Allow redirecting to subdomains of the hostname as well. So a login on decentraland.org could redirect to *.decentraland.org, and that would work with explorer-artifacts.decentraland.org. That can be done by replacing the redirectToURL.hostname !== window.location.hostname with !redirectToURL.hostname.endsWith(window.location.hostname) here.

@cazala cazala added the bug Something isn't working label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant